libcamgm
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ca_mgm::CAConfig Class Reference

#include <CAConfig.hpp>

Public Member Functions

 CAConfig (const std::string &file)
 
 ~CAConfig ()
 
void setValue (const std::string &section, const std::string &key, const std::string &value)
 
void deleteValue (const std::string &section, const std::string &key)
 
void deleteSection (const std::string &section)
 
std::string getValue (const std::string &section, const std::string &key) const
 
bool exists (const std::string &section, const std::string &key) const
 
std::list< std::string > getKeylist (const std::string &section) const
 
void copySection (const std::string &srcSection, const std::string &destSection)
 
CAConfigclone (const std::string &file)
 
std::string filename () const
 
void dump ()
 

Private Member Functions

 CAConfig ()
 
 CAConfig (const CAConfig &)
 
CAConfigoperator= (const CAConfig &)
 
void dumpTree (CASection *section, int level=0)
 
void validateAndFix ()
 

Private Attributes

ca_mgm::RWCOW_pointer< CAConfigImpl > m_impl
 

Detailed Description

Class for reading and writing the openssl.cnf

Constructor & Destructor Documentation

◆ CAConfig() [1/3]

ca_mgm::CAConfig::CAConfig ( const std::string &  file)

Create a new object from file

◆ ~CAConfig()

ca_mgm::CAConfig::~CAConfig ( )

◆ CAConfig() [2/3]

ca_mgm::CAConfig::CAConfig ( )
private

◆ CAConfig() [3/3]

ca_mgm::CAConfig::CAConfig ( const CAConfig )
private

Member Function Documentation

◆ clone()

CAConfig* ca_mgm::CAConfig::clone ( const std::string &  file)

Clone this object

Parameters
filea new filename for this object

◆ copySection()

void ca_mgm::CAConfig::copySection ( const std::string &  srcSection,
const std::string &  destSection 
)

Copy all Keys and values from Section srcSection to Section destSection.

◆ deleteSection()

void ca_mgm::CAConfig::deleteSection ( const std::string &  section)

◆ deleteValue()

void ca_mgm::CAConfig::deleteValue ( const std::string &  section,
const std::string &  key 
)

Delete the Key key in Section section

◆ dump()

void ca_mgm::CAConfig::dump ( )

◆ dumpTree()

void ca_mgm::CAConfig::dumpTree ( CASection *  section,
int  level = 0 
)
private

◆ exists()

bool ca_mgm::CAConfig::exists ( const std::string &  section,
const std::string &  key 
) const

Check if Key key in Section section exists.

◆ filename()

std::string ca_mgm::CAConfig::filename ( ) const

return current filename

◆ getKeylist()

std::list<std::string> ca_mgm::CAConfig::getKeylist ( const std::string &  section) const

Return a List of all Keys in Section section.

◆ getValue()

std::string ca_mgm::CAConfig::getValue ( const std::string &  section,
const std::string &  key 
) const

Get the value of Section section with the Key key.

◆ operator=()

CAConfig& ca_mgm::CAConfig::operator= ( const CAConfig )
private

◆ setValue()

void ca_mgm::CAConfig::setValue ( const std::string &  section,
const std::string &  key,
const std::string &  value 
)

Set a new value in Section section with the Key key.

◆ validateAndFix()

void ca_mgm::CAConfig::validateAndFix ( )
private

Check the format of the template and fix it if required. (SLES9 => SLES10 update)

Member Data Documentation

◆ m_impl

ca_mgm::RWCOW_pointer<CAConfigImpl> ca_mgm::CAConfig::m_impl
private

The documentation for this class was generated from the following file: