51 #ifndef HEADER_INCLUDED__SAGA_API__metadata_H
52 #define HEADER_INCLUDED__SAGA_API__metadata_H
119 bool Save_JSON (
const CSG_String &File)
const;
124 bool Assign (
const CSG_MetaData &MetaData,
bool bAddChildren =
true);
130 bool Cmp_Name (
const CSG_String &String,
bool bNoCase =
true)
const;
136 bool Get_Content (
const CSG_String &Name,
double &Value)
const;
137 bool Get_Content (
const CSG_String &Name,
int &Value)
const;
140 void Fmt_Content (
const char *Format, ...);
141 void Fmt_Content (
const wchar_t *Format, ...);
142 bool Cmp_Content (
const CSG_String &String,
bool bNoCase =
false)
const;
146 int Get_Count (
void)
const {
return( (
int)m_Children.Get_Size() ); }
164 bool Mov_Child (
int from_Index,
int to_Index);
165 bool Del_Child (
int Index);
169 bool Del_Children (
int Depth = 0,
const SG_Char *Name = NULL);
171 CSG_MetaData * operator () (
int Index )
const {
return( Get_Child(Index) ); }
173 CSG_MetaData & operator [] (
int Index ) {
return( *Get_Child(Index) ); }
175 const CSG_MetaData & operator [] (
int Index )
const {
return( *Get_Child(Index) ); }
180 const SG_Char *
Get_Property (
int Index)
const {
return( Index >= 0 && Index < m_Prop_Values.Get_Count() ? m_Prop_Values[Index].c_str() : NULL ); }
183 bool Get_Property (
const CSG_String &Name,
double &Value)
const;
184 bool Get_Property (
const CSG_String &Name,
int &Value)
const;
187 bool Add_Property (
const CSG_String &Name,
double Value);
188 bool Add_Property (
const CSG_String &Name,
int Value);
190 bool Set_Property (
const CSG_String &Name,
const CSG_String &Value,
bool bAddIfNotExists =
true);
191 bool Set_Property (
const CSG_String &Name,
double Value,
bool bAddIfNotExists =
true);
192 bool Set_Property (
const CSG_String &Name,
int Value,
bool bAddIfNotExists =
true);
193 bool Set_Property (
const CSG_String &Name,
sLong Value,
bool bAddIfNotExists =
true);
194 bool Cmp_Property (
const CSG_String &Name,
const CSG_String &String,
bool bNoCase =
false)
const;
196 bool Del_Property (
int i);
199 class CSG_Table Get_Table (int Flags = 0)
const;
218 int _Get_Child (
const CSG_String &Name)
const;
219 int _Get_Property (
const CSG_String &Name)
const;
221 void _Load (
class wxXmlNode *pNode);
222 void _Save (
class wxXmlNode *pNode)
const;
246 bool is_Connected (
void)
const;
261 class wxInputStream * _Request (
const CSG_String &Request);
276 #endif // #ifndef HEADER_INCLUDED__SAGA_API__metadata_H