MiKTeX 23.10-next
A scalable TeX distribution
|
INI container. More...
#include <miktex/Core/Cfg.h>
Classes | |
class | Key |
An instance of this class provides the interface to an INI section. More... | |
class | KeyIterator |
Implements an interator for INI sections. More... | |
class | Value |
An instance of this class provides the interface to an INI value. More... | |
class | ValueIterator |
Implements an interator for INI values. More... | |
Public Types | |
enum class | Option { NoOverwriteKeys , NoOverwriteValues } |
INI options. More... | |
typedef MiKTeX::Util::OptionSet< Option > | Options |
Public Member Functions | |
virtual Options | GetOptions () const =0 |
virtual void | SetOptions (Options options)=0 |
virtual bool | Empty () const =0 |
Tests whether this INI container is empty. More... | |
virtual MD5 | GetDigest () const =0 |
virtual std::shared_ptr< Value > | GetValue (const std::string &keyName, const std::string &valueName) const =0 |
virtual bool | TryGetValueAsString (const std::string &keyName, const std::string &valueName, std::string &value) const =0 |
virtual bool | TryGetValueAsStringVector (const std::string &keyName, const std::string &valueName, std::vector< std::string > &value) const =0 |
virtual void | SetModified (bool b)=0 |
virtual bool | IsModified () const =0 |
Tests whether this INI container has been modified. More... | |
virtual void | PutValue (const std::string &keyName, const std::string &valueName, const std::string &value)=0 |
virtual void | PutValue (const std::string &keyName, const std::string &valueName, const std::string &value, const std::string &documentation, bool commentedOut)=0 |
virtual void | Read (const MiKTeX::Util::PathName &path)=0 |
virtual void | Read (std::istream &reader)=0 |
virtual void | Read (const MiKTeX::Util::PathName &path, bool mustBeSigned)=0 |
virtual void | Read (std::istream &reader, bool mustBeSigned)=0 |
virtual void | Read (const MiKTeX::Util::PathName &path, const MiKTeX::Util::PathName &publicKeyFile)=0 |
virtual void | Read (std::istream &reader, const MiKTeX::Util::PathName &publicKeyFile)=0 |
virtual void | Write (const MiKTeX::Util::PathName &path)=0 |
virtual void | Write (const MiKTeX::Util::PathName &path, const std::string &header)=0 |
virtual void | Write (const MiKTeX::Util::PathName &path, const std::string &header, IPrivateKeyProvider *privateKeyProvider)=0 |
virtual std::shared_ptr< Key > | GetKey (const std::string &keyName) const =0 |
virtual void | DeleteKey (const std::string &keyName)=0 |
virtual void | DeleteValue (const std::string &keyName, const std::string &valueName)=0 |
virtual bool | ClearValue (const std::string &keyName, const std::string &valueName)=0 |
virtual bool | IsSigned () const =0 |
virtual KeyIterator | begin ()=0 |
Gets an iterator to the first container section. More... | |
virtual KeyIterator | end ()=0 |
Gets an iterator referring to the past-the-end section. More... | |
virtual std::size_t | GetSize () const =0 |
Static Public Member Functions | |
static std::unique_ptr< Cfg > | Create () |
INI container.
|
strong |
INI options.
|
pure virtual |
Gets an iterator to the first container section.
|
pure virtual |
Clears an INI value.
keyName | Identifies the section. |
keyName | Identifies the value within the section. |
|
static |
Creates a new INI container.
|
pure virtual |
Deletes an INI section.
keyName | Identifies the section. |
|
pure virtual |
Deletes an INI value.
keyName | Identifies the section. |
keyName | Identifies the value within the section. |
|
pure virtual |
Tests whether this INI container is empty.
|
pure virtual |
Gets an iterator referring to the past-the-end section.
|
pure virtual |
Calculates the digest (MD5) of this INI container.
|
pure virtual |
Gets an INI section.
keyName | Identifies the section. |
|
pure virtual |
|
pure virtual |
Gets the numeber of sections. @eturn Returns the number of sections.
|
pure virtual |
Gets an INI value.
keyName | The name of the section. |
valueName | The name of the value. |
|
pure virtual |
Tests whether this INI container has been modified.
|
pure virtual |
Checks whether this INI container is signed.
true
, if the container is signed.
|
pure virtual |
Sets an INI value.
keyName | The name of the section. |
valueName | The name of the value. |
value | The value as a string. |
|
pure virtual |
Sets an INI value.
keyName | The name of the section. |
valueName | The name of the value. |
value | The value as a string. |
documentation | The value docstring. |
commentedOut | Indicates whether te value is disabled. |
|
pure virtual |
Reads from an INI text file.
path | The path to the INI file. |
|
pure virtual |
Reads from an INI text file and optionally verifies the signature.
path | The path to the INI file. |
mustBeSigned | Indicates whether the text file must be signed. |
|
pure virtual |
Reads from an INI text file and verifies the signature.
path | The path to the INI file. |
publicKeyFile | The path to the public key file |
|
pure virtual |
Reads from an INI text stream.
reader | The text stream. |
|
pure virtual |
Reads from an INI text stream and optionally verifies the signature.
reader | The text stream. |
mustBeSigned | Indicates whether the text file must be signed. |
|
pure virtual |
Reads from an INI text stream and verifies the signature.
reader | The text stream. |
publicKeyFile | The path to the public key file |
|
pure virtual |
Marks this INI container as modified/unmodified.
b | Indicates wheter the container should be marked as modified. |
|
pure virtual |
|
pure virtual |
Gets an INI value.
keyName | The name of the section. | |
valueName | The name of the value. | |
[out] | value | The value as a string. |
true
, if the value was found.
|
pure virtual |
Gets an INI value.
keyName | The name of the section. | |
valueName | The name of the value. | |
[out] | value | The value as a string vector. |
true
, if the value was found.
|
pure virtual |
Writes this INI container into a file.
path | The path to the INIF file. |
|
pure virtual |
Writes this INI container into a file.
path | The path to the INIF file. |
header | The header to be written as a comment. |
|
pure virtual |
Writes this INI container into a file and signs it.
path | The path to the INIF file. |
header | The header to be written as a comment. |
privateKeyProvider | The private key which is used to sign the container. |