Display current entry in another window
[ttodo.git] / tde.h
blob7003d043e7f2f0b025770f374573b39ace68ca67
1 // tde.h
2 //
4 #ifndef TDE_H_27699F347D16DF25781577481B852F4D
5 #define TDE_H_27699F347D16DF25781577481B852F4D
7 #include <ustl.h>
8 using namespace ustl;
10 /// ToDo list entry.
11 class CTodoEntry {
12 public:
13 enum EState {
14 state_Completed,
15 state_Last
17 enum EPriority {
18 priority_Highest,
19 priority_High,
20 priority_Medium,
21 priority_Low,
22 priority_Lowest,
23 priority_Last
25 public:
26 CTodoEntry (void);
27 void read (istream& is);
28 void write (ostream& os) const;
29 size_t stream_size (void) const;
30 public:
31 string m_Text; ///< Description of what to do.
32 string m_Comment; ///< Completion comment.
33 time_t m_Created; ///< When it was created.
34 time_t m_Done; ///< When it was completed.
35 uint32_t m_Id; ///< Unique id of the entry.
36 uint32_t m_Parent; ///< m_Id of the parent entry.
37 uint16_t m_Priority; ///< Priority value. See #EPriority.
38 uint16_t m_State; ///< State flags, see #EState.
41 typedef vector<CTodoEntry> todolist_t;
43 ALIGNOF (CTodoEntry, alignof (time_t()))
44 STD_STREAMABLE (CTodoEntry)
46 #endif