PLCnext API Documentation
21.0.0.35466
Arp
System
Commons
Configuration
ThreadConfigs.hpp
1
//
3
// Copyright PHOENIX CONTACT Electronics GmbH
4
//
6
#pragma once
7
#include "
Arp/System/Core/Arp.h
"
8
#include "Arp/System/Commons/Xml/IXmlSerializable.hpp"
9
#include "Arp/System/Commons/Configuration/ThreadConfig.hpp"
10
11
#include <list>
12
13
namespace
Arp
{
namespace
System
{
namespace
Commons {
namespace
Configuration
14
{
15
16
using namespace
Arp::System::Commons::Xml
;
17
18
class
ThreadConfigs
:
public
IXmlSerializable
,
private
Loggable
<ThreadConfigs>
19
{
20
public
:
// typedefs
21
using
Items = std::list<ThreadConfig>;
22
23
public
:
// construction/destruction
25
ThreadConfigs
(
void
) =
default
;
27
ThreadConfigs
(
const
ThreadConfigs
& arg) =
delete
;
29
ThreadConfigs
(
ThreadConfigs
&& arg) =
delete
;
31
~
ThreadConfigs
(
void
) =
default
;
32
33
public
:
// setter/getter operations
34
Items& GetItems();
35
bool
TryGetThreadConfig(
const
String
& threadName,
ThreadConfig::ConstPtr
& threadConfig)
const
;
36
const
ThreadConfig
& GetThreadConfig(
const
String
& threadName)
const
;
37
38
public
:
// operations
39
void
Clear(
void
);
40
41
public
:
// IXmlSerializable operations
42
void
ReadXml(
XmlReader
& reader,
XmlSerializationContext
& context)
override
;
43
void
WriteXml(
XmlWriter
& writer,
XmlSerializationContext
& context)
override
;
44
45
private
:
// static fields
46
static
const
char
* XmlElementName;
47
48
private
:
// fields
49
Items items;
50
};
51
53
// inline methods of class ThreadConfigs
54
inline
void
ThreadConfigs::Clear()
55
{
56
this->items.clear();
57
}
58
59
inline
ThreadConfigs::Items& ThreadConfigs::GetItems()
60
{
61
return
this->items;
62
}
63
64
}}}}
// end of namespace Arp::System::Commons::Configuration
Arp::System::Commons::Xml
Namespace for classes to read XML files
Definition:
ConfigHeader.hpp:11
Arp::System::Commons::Xml::XmlWriter
Class to write an XML File
Definition:
XmlWriter.hpp:20
Arp::System::Commons::Configuration::ThreadConfigs
Definition:
ThreadConfigs.hpp:18
Arp::BasicString< char8 >
Arp.h
Arp::System::Commons::Diagnostics::Logging::Loggable
Definition:
Loggable.hxx:18
Arp::System::Commons::Xml::IXmlSerializable
Interface for all classes which should be serializable for xml
Definition:
IXmlSerializable.hpp:17
Arp
Root namespace for the PLCnext API
Arp::System::Commons::Xml::XmlReader
Class to read an XML File. Non buffered reader, can only read forward
Definition:
XmlReader.hpp:22
Arp::System::Acf::ComponentCategory::System
System components used by the System, Device, Plc or Io domains.
Arp::System::Commons::Xml::XmlSerializationContext
XML context used during XML reading and writing to hold the context information
Definition:
XmlSerializationContext.hpp:25
Arp::System::Commons::Configuration::ThreadConfig
Definition:
ThreadConfig.hpp:21
Generated on Fri Dec 11 2020 14:17:53 for PLCnext API Documentation by
1.8.13