libcsdbg  1.28
C++ exception (and generic) stack trace debug library
dictionary.hpp
Go to the documentation of this file.
1 #ifndef _CSDBG_DICTIONARY
2 #define _CSDBG_DICTIONARY 1
3 
10 #include "./string.hpp"
11 
12 namespace csdbg {
13 
32 class dictionary: virtual public chain<string>
33 {
34 protected:
35 
36  /* Protected variables */
37 
40  bool m_mode;
42 public:
43 
44  /* Constructors, copy constructors and destructor */
45 
46  dictionary(const i8*, const i8* = NULL, bool = false);
47 
48  dictionary(const dictionary&);
49 
50  virtual ~dictionary();
51 
52  virtual dictionary* clone() const;
53 
54 
55  /* Accessor methods */
56 
57  virtual const i8* name() const;
58 
59  virtual bool mode() const;
60 
61  virtual dictionary& set_name(const i8*);
62 
63  virtual dictionary& set_mode(bool);
64 
65 
66  /* Operator overloading methods */
67 
68  virtual dictionary& operator=(const dictionary&);
69 
70 
71  /* Generic methods */
72 
73  virtual dictionary& load_file(const i8*);
74 
75  virtual const string* lookup(const string&, bool = false) const;
76 };
77 
78 }
79 
80 #endif
81 
virtual dictionary * clone() const
Object virtual copy constructor.
Definition: dictionary.cpp:85
dictionary(const i8 *, const i8 *=NULL, bool=false)
Object constructor.
Definition: dictionary.cpp:24
Lightweight, templated, doubly-linked list (using XOR linking)
Definition: chain.hpp:33
bool m_mode
Lookup mode.
Definition: dictionary.hpp:40
A named collection of words (for syntax highlighters)
Definition: dictionary.hpp:32
virtual bool mode() const
Get the lookup mode.
Definition: dictionary.cpp:107
char i8
8-bit signed integer
Definition: config.hpp:72
i8 * m_name
Dictionary name.
Definition: dictionary.hpp:38
virtual const i8 * name() const
Get the dictionary name.
Definition: dictionary.cpp:96
virtual ~dictionary()
Object destructor.
Definition: dictionary.cpp:71
virtual dictionary & set_name(const i8 *)
Set the name.
Definition: dictionary.cpp:123
virtual dictionary & operator=(const dictionary &)
Assignment operator.
Definition: dictionary.cpp:163
Class csdbg::string definition.
virtual dictionary & load_file(const i8 *)
Load words from a dictionary file.
Definition: dictionary.cpp:193
virtual dictionary & set_mode(bool)
Set the lookup mode.
Definition: dictionary.cpp:147
virtual const string * lookup(const string &, bool=false) const
Dictionary lookup.
Definition: dictionary.cpp:324