This class reads a single Tic document and stores its content.
More...
#include <TicDocument.hpp>
|
| TicDocument (const TicDocument &arg)=delete |
|
| TicDocument (TicDocument &&arg) noexcept |
| Default move constructor.
|
|
TicDocument & | operator= (const TicDocument &arg)=delete |
|
TicDocument & | operator= (TicDocument &&arg) noexcept |
| Default move-assignment operator.
|
|
virtual | ~TicDocument (void) |
| Default destructor.
|
|
| TicDocument (void) |
| The default constructor creates an empty document.
|
|
const Content & | GetContent (void) const |
| Returns the content of this Tic document. More...
|
|
ContentPtr | GetContentPtr (void) const noexcept |
| Returns a pointer to the content More...
|
|
void | Load (const String &filename) |
| Loads the document while the root element is created through a call to CreateContent. More...
|
|
virtual ContentPtr | CreateContent (const String &rootElementName) |
| Creates the document content. More...
|
|
Impl & | GetImpl (void) |
| For internal use only.
|
|
const Impl & | GetImpl (void) const |
|
This class reads a single Tic document and stores its content.
◆ CreateContent()
TicDocument::ContentPtr Arp::Io::Commons::Configuration::TicDocument::CreateContent |
( |
const String & |
rootElementName | ) |
|
|
virtual |
Creates the document content.
- Parameters
-
rootElementName | The name of the root element of the Tic document. |
- Returns
- A shared pointer to the new created content.
The default implementation creates the content as an empty instance of TicBase. This operation should be overloaded to create specialized content, depending on the root element type.
◆ GetContent()
const TicDocument::Content & Arp::Io::Commons::Configuration::TicDocument::GetContent |
( |
void |
| ) |
const |
Returns the content of this Tic document.
- Returns
- The reference to the content
- Exceptions
-
InvalidOperationException | If the document was not loaded yet. |
◆ GetContentPtr()
TicDocument::ContentPtr Arp::Io::Commons::Configuration::TicDocument::GetContentPtr |
( |
void |
| ) |
const |
|
noexcept |
Returns a pointer to the content
- Returns
- The content pointer or nullptr if document was not loaded yet.
◆ Load()
void Arp::Io::Commons::Configuration::TicDocument::Load |
( |
const String & |
filename | ) |
|
Loads the document while the root element is created through a call to CreateContent.
- Parameters
-
filename | The filename of the document to load. |
The documentation for this class was generated from the following files:
- Arp/Io/Commons/Configuration/TicDocument.hpp
- Arp/Io/Commons/Configuration/TicDocument.cpp