-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEntry.h
74 lines (59 loc) · 1.56 KB
/
Entry.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// -*- C++ -*-
//
//--------------------------------------------------------------------------------
//
// Michael A.G. Aivazis
// California Institute of Technology
// (C) 1998-2005 All Rights Reserved
//
// <LicenseText>
//
//--------------------------------------------------------------------------------
//
#if !defined(journal_Entry_h)
#define journal_Entry_h
// forward declarations
namespace journal {
class Entry;
}
//
class journal::Entry
{
// types
public:
typedef std::string string_t;
typedef std::vector<string_t> page_t;
typedef std::map<string_t, string_t> meta_t;
// interface
public:
inline void newline(string_t text);
inline size_t lines() const;
inline page_t::const_iterator lineEnd() const;
inline page_t::const_iterator lineBegin() const;
inline string_t & operator[](string_t key);
inline string_t operator[](string_t key) const;
inline meta_t::const_iterator metaEnd() const;
inline meta_t::const_iterator metaBegin() const;
static inline void defaultAttributes(const meta_t & settings);
// meta-methods
public:
virtual ~Entry();
inline Entry();
// disable these
private:
Entry(const Entry &);
const Entry & operator=(const Entry &);
// data
private:
meta_t _meta;
page_t _text;
static meta_t _defaults;
};
#endif
// get the inline definitions
#define journal_Entry_icc
#include "Entry.icc"
#undef journal_Entry_icc
// version
// $Id: Entry.h,v 1.1.1.1 2006-11-27 00:09:37 aivazis Exp $
// End of file