Important update:

- DataTree->GetStr return Member->Value or NULL if not found
- Rename DeviceCore EDataType to EMBDataType, avoid conflict with JSONpaser
- Add DataTree to FunctionCore with LoadConfig() method
- Change ProcessName to char * (from char[])
- JSONparse:
  - Rename RootPath to BasePath on all methods to reduce confusion
  - Allow FilePath to be NULL, add '/' if not present
  - Fixed Parsing sequence in ParseObject & ParseArray
This commit is contained in:
Charl Wentzel
2017-04-10 21:33:14 +02:00
parent 9b42d516a1
commit ee29625b9a
8 changed files with 89 additions and 66 deletions

View File

@@ -66,18 +66,18 @@ public:
bool CreateBuffer( int pBufLen );
bool FillBuffer();
void FreeBuffer();
bool ReadFromBuffer( const char * RootPath );
bool ReadFromBuffer( const char * BasePath );
// Input
bool ReadFromHandle( const char * RootPath, const int Handle, bool pRefillBuffer );
bool ReadFromFile( const char * RootPath, const char * Path, const char * FileName );
bool ReadFromFile( const char * RootPath, const char * FilePath );
bool ReadFromHandle( const char * BasePath, const int Handle, bool pRefillBuffer );
bool ReadFromFile( const char * BasePath, const char * Path, const char * FileName );
bool ReadFromFile( const char * BasePath, const char * FilePath );
// Output
bool WriteToHandle( const char * RootPath, const int Handle, const int Indent = 2 );
bool WriteToScreen( const char * RootPath, const int Indent = 2 );
bool WriteToFile( const char * RootPath, const char * Path, const char * FileName, const int Indent = 2 );
bool WriteToFile( const char * RootPath, const char * FilePath, const int Indent = 2 );
bool WriteToHandle( const char * BasePath, const int Handle, const int Indent = 2 );
bool WriteToScreen( const char * BasePath, const int Indent = 2 );
bool WriteToFile( const char * BasePath, const char * Path, const char * FileName, const int Indent = 2 );
bool WriteToFile( const char * BasePath, const char * FilePath, const int Indent = 2 );
const char * GetError() { return ((Error)? ErrorText : "Success"); };
};