00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00043 #ifndef HDFNode_h_
00044 #define HDFNode_h_ 1
00045
00046 #include <string>
00047 #include "ClearSilverNodeComparator.h"
00048
00049 namespace ClearSilver
00050 {
00051 class ClearSilverNode;
00052 class HDF;
00053
00061 class HDFNode
00062 {
00063 public:
00064 typedef std::string Name;
00065
00066 private:
00067
00068 HDFNode& operator = (const HDFNode&);
00069
00070 protected:
00072 void swap (HDFNode&) throw();
00073 virtual void push (const Name&, const ClearSilverNode&) = 0;
00074 virtual void pop () = 0;
00075 virtual ClearSilverNode top () const = 0;
00076
00077 public:
00079
00081 HDFNode ();
00083 HDFNode (const HDFNode&);
00085 ~HDFNode () throw();
00086
00087
00089 virtual ClearSilverNode node () const = 0;
00090
00100
00101 void set_value (const char* value);
00102 void set_value (const std::string& value);
00103 void set_value (int value);
00104 void set_value (bool value);
00105 void set_value (const char* key, const char* value);
00106 void set_value (const std::string& key, const std::string& value);
00107 void set_value (const char* key, int value);
00108 void set_value (const std::string& key, int value);
00109 void set_value (const char* key, unsigned int value);
00110 void set_value (const std::string& key, unsigned int value);
00111 void set_value (const char* key, bool value);
00112 void set_value (const std::string& key, bool value);
00113
00114 void read_file (const char* filename);
00115 void read_file (const std::string& filename);
00116
00117
00119 void sort (ClearSilverNodeComparator::Ptr);
00120
00127
00129 void remove_tree (const char* key);
00131 void remove_tree (const std::string& key);
00133 void remove_tree (HDF&);
00142 void remove_cgi ();
00143
00144
00151 static bool& debug ();
00152 };
00153 };
00154
00155 #endif