Important update:
- DataTreeCore:
- Renamed Get/SetMemXxx() methods to Get/SetChXxx()
- Renamed GetMember() to GetChild()
- Updated: JSONparse, ApplicationCore, FunctionCore, SelectableCore,
and WatchdogCore
- Remove unused PrevChild & Last vars in GetChild (GetMember)
- JSONparseCore:
- Use return values from write() and PrintXxx() methods to report fail
- SelectableCore:
- Fix possible uninitialised FlowCtrl & Parity value
- DateTimeCore:
- Fix possible memory overrun in temp buffer
- EventBufferCore:
- Fix possible uninitialised value error in AddEvent
This commit is contained in:
@@ -66,46 +66,46 @@ public:
|
||||
const int GetLen() { return Len; };
|
||||
const int GetLen( const char * Path );
|
||||
|
||||
CDataMember * GetMember( const char * Path, bool Create = false );
|
||||
CDataMember * GetMemFirstChild( const char * Path );
|
||||
CDataMember * GetMemElement( const char * Path, const int Index );
|
||||
CDataMember * GetChild( const char * Path, bool Create = false );
|
||||
CDataMember * GetChFirstChild( const char * Path );
|
||||
CDataMember * GetChElement( const char * Path, const int Index );
|
||||
|
||||
inline CDataMember * GetFirstChild() { return FirstChild; };
|
||||
inline CDataMember * GetElement( const int Index ) { return GetMemElement( NULL, Index ); };
|
||||
inline CDataMember * GetElement( const int Index ) { return GetChElement( NULL, Index ); };
|
||||
|
||||
inline CDataMember * GetParent() { return Parent; };
|
||||
inline CDataMember * GetPrevPeer() { return PrevPeer; };
|
||||
inline CDataMember * GetNextPeer() { return NextPeer; };
|
||||
|
||||
const char * GetMemStr( const char * Path, const char * Default = NULL, bool Create = false );
|
||||
const char * GetMemStr( const char * Path, int &Len, const char * Default = NULL, bool Create = false );
|
||||
const bool GetMemBool( const char * Path, bool Default = false, bool Create = false );
|
||||
const long GetMemInt( const char * Path, long Default = 0, bool Create = false, const char * Mask = NULL );
|
||||
const double GetMemFloat( const char * Path, double Default = 0.0, bool Create = false, const char * Mask = NULL );
|
||||
const char * GetChStr( const char * Path, const char * Default = NULL, bool Create = false );
|
||||
const char * GetChStr( const char * Path, int &Len, const char * Default = NULL, bool Create = false );
|
||||
const bool GetChBool( const char * Path, bool Default = false, bool Create = false );
|
||||
const long GetChInt( const char * Path, long Default = 0, bool Create = false, const char * Mask = NULL );
|
||||
const double GetChFloat( const char * Path, double Default = 0.0, bool Create = false, const char * Mask = NULL );
|
||||
|
||||
inline const char * GetStr( const char * Default = NULL, bool Create = false ) { return GetMemStr( NULL, Default, Create ); };
|
||||
inline const char * GetStr( int &Len, const char * Default = NULL, bool Create = false ) { return GetMemStr( NULL, Len, Default, Create ); };
|
||||
inline const bool GetBool( bool Default = false, bool Create = false ) { return GetMemBool( NULL, Default, Create ); };
|
||||
inline const long GetInt( long Default = 0, bool Create = false, const char * Mask = NULL ) { return GetMemInt( NULL, Default, Create, Mask ); };
|
||||
inline const double GetFloat( double Default = 0.0, bool Create = false, const char * Mask = NULL ) { return GetMemFloat( NULL, Default, Create, Mask ); };
|
||||
inline const char * GetStr( const char * Default = NULL, bool Create = false ) { return GetChStr( NULL, Default, Create ); };
|
||||
inline const char * GetStr( int &Len, const char * Default = NULL, bool Create = false ) { return GetChStr( NULL, Len, Default, Create ); };
|
||||
inline const bool GetBool( bool Default = false, bool Create = false ) { return GetChBool( NULL, Default, Create ); };
|
||||
inline const long GetInt( long Default = 0, bool Create = false, const char * Mask = NULL ) { return GetChInt( NULL, Default, Create, Mask ); };
|
||||
inline const double GetFloat( double Default = 0.0, bool Create = false, const char * Mask = NULL ) { return GetChFloat( NULL, Default, Create, Mask ); };
|
||||
|
||||
bool SetMemBool( const char * Path, const bool Value );
|
||||
bool SetMemInt( const char * Path, const long Value, const char * Mask = NULL );
|
||||
bool SetMemFloat( const char * Path, const double Value, const char * Mask = NULL );
|
||||
bool SetMemStr( const char * Path, const char * Value = NULL, const int Len = -1 ); // Use Len param if Value contains NULL values
|
||||
bool SetChBool( const char * Path, const bool Value );
|
||||
bool SetChInt( const char * Path, const long Value, const char * Mask = NULL );
|
||||
bool SetChFloat( const char * Path, const double Value, const char * Mask = NULL );
|
||||
bool SetChStr( const char * Path, const char * Value = NULL, const int Len = -1 ); // Use Len param if Value contains NULL values
|
||||
|
||||
inline bool SetBool( const bool Value ) { return SetMemBool( NULL, Value ); };
|
||||
inline bool SetInt( const long Value, const char * Mask = NULL ) { return SetMemInt( NULL, Value, Mask ); };
|
||||
inline bool SetFloat( const double Value, const char * Mask = NULL ) { return SetMemFloat( NULL, Value, Mask ); };
|
||||
inline bool SetStr( const char * Value = NULL, const int Len = -1 ) { return SetMemStr( NULL, Value, Len ); };
|
||||
inline bool SetBool( const bool Value ) { return SetChBool( NULL, Value ); };
|
||||
inline bool SetInt( const long Value, const char * Mask = NULL ) { return SetChInt( NULL, Value, Mask ); };
|
||||
inline bool SetFloat( const double Value, const char * Mask = NULL ) { return SetChFloat( NULL, Value, Mask ); };
|
||||
inline bool SetStr( const char * Value = NULL, const int Len = -1 ) { return SetChStr( NULL, Value, Len ); };
|
||||
|
||||
bool SetMemNull( const char * Path );
|
||||
bool SetMemObject( const char * Path );
|
||||
bool SetMemArray( const char * Path );
|
||||
bool SetChNull( const char * Path );
|
||||
bool SetChObject( const char * Path );
|
||||
bool SetChArray( const char * Path );
|
||||
|
||||
inline bool SetNull() { return SetMemNull( NULL ); };
|
||||
inline bool SetObject() { return SetMemObject( NULL ); };
|
||||
inline bool SetArray() { return SetMemArray( NULL ); };
|
||||
inline bool SetNull() { return SetChNull( NULL ); };
|
||||
inline bool SetObject() { return SetChObject( NULL ); };
|
||||
inline bool SetArray() { return SetChArray( NULL ); };
|
||||
|
||||
bool Clear();
|
||||
bool Delete( const char * Path );
|
||||
|
||||
Reference in New Issue
Block a user