|
PLCnext API Documentation 25.6.0.37
|
This class reads and stores a complete Tic hierarchy defined by a Tic links file. More...
#include <TicConfiguration.hpp>
Public Types | |
| using | RootPtr = std::shared_ptr< ITicSerializable > |
| using | ChildPtr = std::shared_ptr< ITicSerializable > |
| using | Roots = std::vector< RootPtr > |
| using | BufferInfo = Arp::Io::Commons::Data::BufferInfo |
| using | BufferInfos = std::vector< BufferInfo > |
| using | PortDefinition = Arp::Plc::Meta::Commons::Io::PortDefinition |
| using | PortDefinitions = std::vector< PortDefinition > |
| using | TypeDefinition = Arp::Plc::Meta::Commons::Io::TypeDefinition |
| using | TypeDefinitions = std::vector< TypeDefinition > |
Public Member Functions | |
| TicConfiguration (const TicConfiguration &arg)=delete | |
| TicConfiguration (TicConfiguration &&arg) noexcept | |
| Default move constructor. | |
| TicConfiguration & | operator= (const TicConfiguration &arg)=delete |
| TicConfiguration & | operator= (TicConfiguration &&arg) noexcept |
| Default move-assignment operator. | |
| virtual | ~TicConfiguration (void) |
| Default destructor. | |
| TicConfiguration (void) | |
| Default constructor. | |
| const Roots & | GetRoots (void) const |
| Gets the root Tic elements. More... | |
| const BufferInfos & | GetBufferInfos (void) const |
| Returns all available buffer informations. The buffer infos are sorted by the name. More... | |
| const BufferInfo & | GetBufferInfo (const String &name) const |
| Gets a specific BufferInfo. More... | |
| bool | TryGetBufferInfo (const String &name, BufferInfo &bufferInfo) const |
| Tries to get a specific BufferInfo. More... | |
| const PortDefinitions & | GetPortDefinitions (void) const |
| Returns a vector of all PortDefinition that are defined in tic data tree. More... | |
| PortDefinitions | GetPortDefinitions (const String &bufferName) const |
| Returns all port definitions related to one specific buffer in a flat list. More... | |
| const TypeDefinitions & | GetTypeDefinitions () const |
| Returns a vector of TypeDefinition defined by this configuration More... | |
| void | Load (const String &ticLinksPath) |
| Loads the links file and all related Tic files. More... | |
| virtual RootPtr | CreateRoot (const String &rootElementName) |
| Factory operation to create root elements. More... | |
| virtual bool | TryCreateCustomElement (const String &elementName, ChildPtr &result) |
| Factory template method to create custom elements. More... | |
| Impl & | GetImpl (void) |
| For internal use only. | |
| const Impl & | GetImpl (void) const |
This class reads and stores a complete Tic hierarchy defined by a Tic links file.
The links file is loaded with TicConfiguration::Load. It reads all related Tic documents. Instances for the read root elements have to be created with the factory method CreateRoot. All documents which are related with the ArcRole::Parent are added as childs to the root element of the parent root node.
This class provides operations to enumerate over all buffer infos, or search for a specific buffer info, respectively.
|
virtual |
Factory operation to create root elements.
This method is called every time a root element should be created. By default a TicBase element is created. If nullptr is returned the default element will be created.
| rootElementName | The name of the root element to create. |
| const TicConfiguration::BufferInfo & Arp::Io::Commons::Configuration::TicConfiguration::GetBufferInfo | ( | const String & | name | ) | const |
Gets a specific BufferInfo.
| name | The name of the buffer to look for. |
| ArgumentException | If the buffer with the supplied name was not found. |
| const TicConfiguration::BufferInfos & Arp::Io::Commons::Configuration::TicConfiguration::GetBufferInfos | ( | void | ) | const |
Returns all available buffer informations. The buffer infos are sorted by the name.
| TicConfiguration::PortDefinitions Arp::Io::Commons::Configuration::TicConfiguration::GetPortDefinitions | ( | const String & | bufferName | ) | const |
Returns all port definitions related to one specific buffer in a flat list.
| bufferName | Name of the buffer |
| const TicConfiguration::PortDefinitions & Arp::Io::Commons::Configuration::TicConfiguration::GetPortDefinitions | ( | void | ) | const |
Returns a vector of all PortDefinition that are defined in tic data tree.
| const TicConfiguration::Roots & Arp::Io::Commons::Configuration::TicConfiguration::GetRoots | ( | void | ) | const |
Gets the root Tic elements.
| const TicConfiguration::TypeDefinitions & Arp::Io::Commons::Configuration::TicConfiguration::GetTypeDefinitions | ( | ) | const |
Returns a vector of TypeDefinition defined by this configuration
| void Arp::Io::Commons::Configuration::TicConfiguration::Load | ( | const String & | ticLinksPath | ) |
Loads the links file and all related Tic files.
| ticLinksPath | Path of the Tic links file to load. |
|
virtual |
Factory template method to create custom elements.
This method is called to create custom tic elements if TicBase::TryCreateCustomElement returned false. If this methods returns false TicBase::TryCreateElement is called. If needed this methods has to be overriden by the derived class.
| elementName | The name of the element to create. |
| result | The created element |
true</> if an element has been created.| bool Arp::Io::Commons::Configuration::TicConfiguration::TryGetBufferInfo | ( | const String & | name, |
| BufferInfo & | bufferInfo | ||
| ) | const |
Tries to get a specific BufferInfo.
| name | The name of the buffer to look for. |
| bufferInfo | Out vale for found BufferINfo |
| ArgumentException | If the buffer with the supplied name was not found. |