libzypp: zypp/Changelog.h Source File

libzypp 17.38.6

Changelog.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_CHANGELOG_H
13#define ZYPP_CHANGELOG_H
14
15#include <string>
16#include <list>
17#include <utility>
18
19#include <zypp-core/Globals.h>
20#include <zypp-core/Date.h>
21
23namespace zypp
24{
25
27 //
28 // CLASS NAME : ChangelogEntry
29 //
32 class ChangelogEntry
33 {
34 public:
36 ChangelogEntry( const Date & d,
37 std::string a,
38 std::string t )
39 : _date( d ), _author(std::move( a )), _text(std::move( t ))
40 {};
41
42 ~ChangelogEntry()
43 {}
44 Date date() const { return _date; }
45 std::string author() const { return _author; }
46 std::string text() const { return _text; }
47
48 private:
49 Date _date;
50 std::string _author;
51 std::string _text;
52 };
53
55 using Changelog = std::list<ChangelogEntry>;
56
58 std::ostream & operator<<( std::ostream & out, const ChangelogEntry & obj ) ZYPP_API;
59
61} // namespace zypp
63
64#endif // ZYPP_CHANGELOG_H
Date.h
Globals.h
Provides API related macros.
zypp::ChangelogEntry
Single entry in a change log.
Definition Changelog.h:33
zypp::ChangelogEntry::~ChangelogEntry
~ChangelogEntry()
Dtor.
Definition Changelog.h:42
zypp::ChangelogEntry::text
std::string text() const
Definition Changelog.h:46
zypp::ChangelogEntry::date
Date date() const
Definition Changelog.h:44
zypp::ChangelogEntry::_text
std::string _text
Definition Changelog.h:51
zypp::ChangelogEntry::_author
std::string _author
Definition Changelog.h:50
zypp::ChangelogEntry::ChangelogEntry
ChangelogEntry(const Date &d, std::string a, std::string t)
Default ctor.
Definition Changelog.h:36
zypp::ChangelogEntry::author
std::string author() const
Definition Changelog.h:45
zypp::ChangelogEntry::_date
Date _date
Definition Changelog.h:49
zypp::Date
Store and operate on date (time_t).
Definition Date.h:33
a
unsigned short a
Definition mediablocklist.cc:0
std
Definition ansi.h:855
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2
zypp::ZYPP_API
const Arch Arch_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.
Definition Arch.h:173
zypp::Changelog
std::list< ChangelogEntry > Changelog
List of ChangelogEntry.
Definition Changelog.h:55
zypp::operator<<
std::ostream & operator<<(std::ostream &str, const Capabilities &obj)
relates: Capabilities Stream output
Definition Capabilities.cc:65