![]() |
TSDuck v3.46-4965
MPEG Transport Stream Toolkit
|
#include <tsConfigSection.h>
Public Member Functions | |
| ConfigSection ()=default | |
| void | append (const UString &entry, bool val) |
| template<typename INT> requires std::integral<INT> | |
| void | append (const UString &entry, const INT &val) |
| void | append (const UString &entry, const std::vector< bool > &val) |
| template<typename INT> requires std::integral<INT> | |
| void | append (const UString &entry, const std::vector< INT > &val) |
| void | append (const UString &entry, const UChar *val) |
| void | append (const UString &entry, const UString &val) |
| void | append (const UString &entry, const UStringVector &val) |
| bool | boolValue (const UString &entry, size_t index=0, bool defvalue=false) const |
| void | clear () |
| void | deleteEntry (const UString &entry) |
| void | getEntryNames (UStringVector &names) const |
| std::ostream & | save (std::ostream &strm) const |
| void | set (const UString &entry, bool val) |
| template<typename INT> requires std::integral<INT> | |
| void | set (const UString &entry, const INT &val) |
| void | set (const UString &entry, const std::vector< bool > &val) |
| template<typename INT> requires std::integral<INT> | |
| void | set (const UString &entry, const std::vector< INT > &val) |
| void | set (const UString &entry, const UChar *val) |
| void | set (const UString &entry, const UString &val) |
| void | set (const UString &entry, const UStringVector &val) |
| size_t | size () const |
| template<typename INT> requires std::integral<INT> | |
| INT | value (const UString &entry, size_t index=0, const INT &defvalue=static_cast< INT >(0)) const |
| UString | value (const UString &entry, size_t index=0, const UString &defvalue=UString()) const |
| size_t | valueCount (const UString &entry) const |
Representation of a "configuration section".
A configuration section contains a list of "entries". Each entry has one or more values. A value can be interpreted as a string, integer or boolean.
|
default |
Constructor.
|
inline |
Clear content of the section
|
inline |
Get the number of entries in the section.
| void ts::ConfigSection::getEntryNames | ( | UStringVector & | names | ) | const |
Get the names of all entries in the section.
| [out] | names | The returned names of all entries in the section. |
| size_t ts::ConfigSection::valueCount | ( | const UString & | entry | ) | const |
Get the number of values in an entry.
| [in] | entry | Entry name. |
| UString ts::ConfigSection::value | ( | const UString & | entry, |
| size_t | index = 0, | ||
| const UString & | defvalue = UString() ) const |
Get a value in an entry.
| [in] | entry | Entry name. |
| [in] | index | Index of the value in the entry. |
| [in] | defvalue | Default value. |
| INT ts::ConfigSection::value | ( | const UString & | entry, |
| size_t | index = 0, | ||
| const INT & | defvalue = static_cast<INT>(0) ) const |
Get an integer value in an entry.
| INT | An integer type. |
| [in] | entry | Entry name. |
| [in] | index | Index of the value in the entry. |
| [in] | defvalue | Default value. |
| bool ts::ConfigSection::boolValue | ( | const UString & | entry, |
| size_t | index = 0, | ||
| bool | defvalue = false ) const |
Get a boolean value in an entry.
| [in] | entry | Entry name. |
| [in] | index | Index of the value in the entry. |
| [in] | defvalue | Default value. |
|
inline |
Delete an entry
| [in] | entry | Entry name. |
Set the string value of an entry.
| [in] | entry | Entry name. |
| [in] | val | The value to set. |
Set the string value of an entry.
| [in] | entry | Entry name. |
| [in] | val | The value to set. |
| void ts::ConfigSection::set | ( | const UString & | entry, |
| const UStringVector & | val ) |
Set the value of an entry from a vector of strings.
| [in] | entry | Entry name. |
| [in] | val | The values to set. |
| void ts::ConfigSection::set | ( | const UString & | entry, |
| bool | val ) |
Set the boolean value of an entry.
| [in] | entry | Entry name. |
| [in] | val | The value to set. |
| void ts::ConfigSection::set | ( | const UString & | entry, |
| const std::vector< bool > & | val ) |
Set the value of an entry from a vector of booleans.
| [in] | entry | Entry name. |
| [in] | val | The values to set. |
Set the integer value of an entry.
| INT | An integer type. |
| [in] | entry | Entry name. |
| [in] | val | The value to set. |
Set the value of an entry from a vector of integers.
| INT | An integer type. |
| [in] | entry | Entry name. |
| [in] | val | The values to set. |
Append a string value to an entry.
| [in] | entry | Entry name. |
| [in] | val | The value to set. |
Append a string value to an entry.
| [in] | entry | Entry name. |
| [in] | val | The value to set. |
| void ts::ConfigSection::append | ( | const UString & | entry, |
| const UStringVector & | val ) |
Append a vector of strings to an entry.
| [in] | entry | Entry name. |
| [in] | val | The values to append. |
| void ts::ConfigSection::append | ( | const UString & | entry, |
| bool | val ) |
Append a boolean value to an entry.
| [in] | entry | Entry name. |
| [in] | val | The value to append. |
| void ts::ConfigSection::append | ( | const UString & | entry, |
| const std::vector< bool > & | val ) |
Append a vector of booleans to an entry.
| [in] | entry | Entry name. |
| [in] | val | The values to append. |
Append an integer value to an entry.
| INT | An integer type. |
| [in] | entry | Entry name. |
| [in] | val | The value to append. |
Append a vector of integers to an entry.
| INT | An integer type. |
| [in] | entry | Entry name. |
| [in] | val | The values to append. |
| std::ostream & ts::ConfigSection::save | ( | std::ostream & | strm | ) | const |
Save the content of the section in a text streams.
| [in,out] | strm | An standard stream in output mode. |