-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* YmlTree parser Generic XmlTreeItem tree for YAML files --------- Co-authored-by: Evgueni Driouk <evgueni.driouk@arm.com> Co-authored-by: Daniel Brondani <daniel.brondani@arm.com>
- Loading branch information
1 parent
989adc4
commit 657a563
Showing
24 changed files
with
925 additions
and
57 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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
project(YmlTree VERSION 1.0.0) | ||
|
||
add_subdirectory("test") | ||
|
||
SET(SOURCE_FILES YmlTree.cpp YmlFormatter.cpp YmlTreeParserInterface.cpp YmlTreeParserInterface.h) | ||
SET(HEADER_FILES YmlTree.h YmlFormatter.h) | ||
|
||
list(TRANSFORM SOURCE_FILES PREPEND src/) | ||
list(TRANSFORM HEADER_FILES PREPEND include/) | ||
|
||
add_library(YmlTree STATIC ${SOURCE_FILES} ${HEADER_FILES}) | ||
|
||
set_property(TARGET YmlTree PROPERTY | ||
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") | ||
|
||
target_include_directories(YmlTree PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) | ||
|
||
target_link_libraries(YmlTree ErrLog XmlTree RteFsUtils RteUtils yaml-cpp YmlSchemaChecker) |
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,37 @@ | ||
/* | ||
* Copyright (c) 2020-2023 Arm Limited. All rights reserved. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
#ifndef YMLFORMATTER_H | ||
#define YMLFORMATTER_H | ||
|
||
#include "AbstractFormatter.h" | ||
#include "YmlTree.h" | ||
|
||
|
||
/** | ||
* @brief class to generate XML formatted text from XMLTreeElement items in a buffer of type string | ||
*/ | ||
class YmlFormatter : public AbstractFormatter | ||
{ | ||
public: | ||
/** | ||
* @brief default constructor | ||
*/ | ||
YmlFormatter(); | ||
|
||
/** | ||
* @brief generate formatted text | ||
* @param rootElement pointer to an instance of type XMLTreeElement | ||
* @param schemaFile name of a schema file (not used) | ||
* @param schemaVersion version of a schema file (not used) | ||
* @return string containing instance content as XML formatted text | ||
*/ | ||
std::string FormatElement(XMLTreeElement* rootElement, | ||
const std::string& schemaFile = XmlItem::EMPTY_STRING, | ||
const std::string& schemaVersion = XmlItem::EMPTY_STRING) override; | ||
|
||
}; | ||
|
||
#endif /* YMLFORMATTER_H */ |
Oops, something went wrong.