-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- VFS: Now takes app shutdown into account as earlier trigger for plu…
…gin unloads to help with clean shutdowns - CORE: Added some DataNode related classes related to upcoming restructure for data node plugins, not used yet - GucefArchiver: Call app stop before exit to allow for a clean shutdown
- Loading branch information
1 parent
dfae103
commit 2b36a62
Showing
16 changed files
with
535 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
platform/gucefCORE/include/gucefCORE_CDataNodeDocumentBuilder.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/* | ||
* gucefCORE: GUCEF module providing O/S abstraction and generic solutions | ||
* | ||
* Copyright (C) 1998 - 2024. Dinand Vanvelzen | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef GUCEF_CORE_CDATANODEDOCUMENTBUILDER_H | ||
#define GUCEF_CORE_CDATANODEDOCUMENTBUILDER_H | ||
|
||
/*-------------------------------------------------------------------------// | ||
// // | ||
// INCLUDES // | ||
// // | ||
//-------------------------------------------------------------------------*/ | ||
|
||
#ifndef GUCEF_CORE_CIDOCUMENTPARSERCALLBACKS_H | ||
#include "gucefCORE_CIDocumentParserCallbacks.h" | ||
#define GUCEF_CORE_CIDOCUMENTPARSERCALLBACKS_H | ||
#endif /* GUCEF_CORE_CIDOCUMENTPARSERCALLBACKS_H ? */ | ||
|
||
#ifndef GUCEF_CORE_CDATANODE_H | ||
#include "CDataNode.h" | ||
#define GUCEF_CORE_CDATANODE_H | ||
#endif /* GUCEF_CORE_CDATANODE_H ? */ | ||
|
||
/*-------------------------------------------------------------------------// | ||
// // | ||
// NAMESPACE // | ||
// // | ||
//-------------------------------------------------------------------------*/ | ||
|
||
namespace GUCEF { | ||
namespace CORE { | ||
|
||
/*-------------------------------------------------------------------------// | ||
// // | ||
// CLASSES // | ||
// // | ||
//-------------------------------------------------------------------------*/ | ||
|
||
/** | ||
* Implementation which uses document parser callbacks to contruct a DataNode class based tree | ||
*/ | ||
class GUCEF_CORE_PUBLIC_CPP CDataNodeDocumentBuilder : public CIDocumentParserCallbacks | ||
{ | ||
public: | ||
|
||
CDataNodeDocumentBuilder( void ); | ||
CDataNodeDocumentBuilder( const CDataNodeDocumentBuilder& src ); | ||
virtual ~CDataNodeDocumentBuilder(); | ||
CDataNodeDocumentBuilder& operator=( const CDataNodeDocumentBuilder& src ); | ||
|
||
virtual void OnDocumentBegin( void ) GUCEF_VIRTUAL_OVERRIDE; | ||
virtual void OnDocumentEnd( void ) GUCEF_VIRTUAL_OVERRIDE; | ||
virtual void OnNodeBegin( const CVariant& nodeId, int nodeType ) GUCEF_VIRTUAL_OVERRIDE; | ||
virtual void OnNodeEnd( const CVariant& nodeId ) GUCEF_VIRTUAL_OVERRIDE; | ||
virtual void OnNodeAttribute( const CVariant& nodeId, const CVariant& attributeId, const CVariant& attributeValue ) GUCEF_VIRTUAL_OVERRIDE; | ||
virtual void OnNodeValue( const CVariant& nodeId, const CVariant& nodeValue ) GUCEF_VIRTUAL_OVERRIDE; | ||
virtual void OnNodeChildrenBegin( const CVariant& nodeId ) GUCEF_VIRTUAL_OVERRIDE; | ||
virtual void OnNodeChildrenEnd( const CVariant& nodeId ) GUCEF_VIRTUAL_OVERRIDE; | ||
virtual void OnParseError( Int32 errorCode, const CString& description ) GUCEF_VIRTUAL_OVERRIDE; | ||
|
||
CDataNode document; | ||
|
||
private: | ||
|
||
CDataNode* m_nodeCursor; | ||
}; | ||
|
||
/*-------------------------------------------------------------------------// | ||
// // | ||
// NAMESPACE // | ||
// // | ||
//-------------------------------------------------------------------------*/ | ||
|
||
}; /* namespace CORE */ | ||
}; /* namespace GUCEF */ | ||
|
||
/*-------------------------------------------------------------------------*/ | ||
|
||
#endif /* GUCEF_CORE_CDATANODEDOCUMENTBUILDER_H ? */ | ||
|
||
/*-------------------------------------------------------------------------*/ |
95 changes: 95 additions & 0 deletions
95
platform/gucefCORE/include/gucefCORE_CIDocumentParserCallbacks.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/* | ||
* gucefCORE: GUCEF module providing O/S abstraction and generic solutions | ||
* | ||
* Copyright (C) 1998 - 2024. Dinand Vanvelzen | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef GUCEF_CORE_CIDOCUMENTPARSERCALLBACKS_H | ||
#define GUCEF_CORE_CIDOCUMENTPARSERCALLBACKS_H | ||
|
||
/*-------------------------------------------------------------------------// | ||
// // | ||
// INCLUDES // | ||
// // | ||
//-------------------------------------------------------------------------*/ | ||
|
||
#ifndef GUCEF_CORE_CSTRING_H | ||
#include "gucefCORE_CString.h" /* framework string implementation */ | ||
#define GUCEF_CORE_CSTRING_H | ||
#endif /* GUCEF_CORE_CSTRING_H ? */ | ||
|
||
#ifndef GUCEF_CORE_CVARIANT_H | ||
#include "gucefCORE_CVariant.h" /* framework variant implementation */ | ||
#define GUCEF_CORE_CVARIANT_H | ||
#endif /* GUCEF_CORE_CVARIANT_H ? */ | ||
|
||
/*-------------------------------------------------------------------------// | ||
// // | ||
// NAMESPACE // | ||
// // | ||
//-------------------------------------------------------------------------*/ | ||
|
||
namespace GUCEF { | ||
namespace CORE { | ||
|
||
/*-------------------------------------------------------------------------// | ||
// // | ||
// CLASSES // | ||
// // | ||
//-------------------------------------------------------------------------*/ | ||
|
||
/** | ||
* Interface class for document parse callbacks | ||
* In XML lingo these are referred to as SAX parsers | ||
* | ||
* Implementing this type of interface allows you to interpret a varied range of schema formats | ||
* due to the abstraction provided. You dont need to know if you are dealing with a JSON or XML or YAML or whatever document | ||
* What matters is the information contained within the document itself, which can be accessed through this type of parser | ||
*/ | ||
class GUCEF_CORE_PUBLIC_CPP CIDocumentParserCallbacks | ||
{ | ||
public: | ||
|
||
CIDocumentParserCallbacks( void ); | ||
CIDocumentParserCallbacks( const CIDocumentParserCallbacks& src ); | ||
virtual ~CIDocumentParserCallbacks(); | ||
CIDocumentParserCallbacks& operator=( const CIDocumentParserCallbacks& src ); | ||
|
||
virtual void OnDocumentBegin( void ) = 0; | ||
virtual void OnDocumentEnd( void ) = 0; | ||
virtual void OnNodeBegin( const CVariant& nodeId, int nodeType ) = 0; | ||
virtual void OnNodeEnd( const CVariant& nodeId ) = 0; | ||
virtual void OnNodeAttribute( const CVariant& nodeId, const CVariant& attributeId, const CVariant& attributeValue ) = 0; | ||
virtual void OnNodeValue( const CVariant& nodeId, const CVariant& nodeValue ) = 0; | ||
virtual void OnNodeChildrenBegin( const CVariant& nodeId ) = 0; | ||
virtual void OnNodeChildrenEnd( const CVariant& nodeId ) = 0; | ||
virtual void OnParseError( Int32 errorCode, const CString& description ) = 0; | ||
|
||
}; | ||
|
||
/*-------------------------------------------------------------------------// | ||
// // | ||
// NAMESPACE // | ||
// // | ||
//-------------------------------------------------------------------------*/ | ||
|
||
}; /* namespace CORE */ | ||
}; /* namespace GUCEF */ | ||
|
||
/*-------------------------------------------------------------------------*/ | ||
|
||
#endif /* GUCEF_CORE_CIDOCUMENTPARSERCALLBACKS_H ? */ | ||
|
||
/*-------------------------------------------------------------------------*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.