libabigail
Public Member Functions | List of all members
config::section Class Reference

The abstraction of one section of the .ini config. More...

#include <abg-ini.h>

Public Member Functions

 section (const string &name)
 Constructor for config::section. More...
 
 section (const string &name, const properties_type &properties)
 Constructor for the config::section. More...
 
virtual ~section ()
 Destructor of config::section. More...
 
void add_property (const property_sptr prop)
 Add one property to this section. More...
 
property_sptr find_property (const string &prop_name) const
 Find a property that has a given name. More...
 
const string & get_name () const
 Get the name of the section. More...
 
const properties_typeget_properties () const
 Get the properties of the section. More...
 
void set_properties (const properties_type &properties)
 Set the properties of the section. More...
 

Detailed Description

The abstraction of one section of the .ini config.

Definition at line 358 of file abg-ini.h.

Constructor & Destructor Documentation

◆ section() [1/2]

section ( const string &  name)

Constructor for config::section.

Parameters
namethe name of the ini section.

Definition at line 794 of file abg-ini.cc.

◆ section() [2/2]

section ( const string &  name,
const properties_type properties 
)

Constructor for the config::section.

Parameters
namethe name of the ini section.
propertiesthe properties of the section.

Definition at line 803 of file abg-ini.cc.

◆ ~section()

~section ( )
virtual

Destructor of config::section.

Definition at line 856 of file abg-ini.cc.

Member Function Documentation

◆ add_property()

void add_property ( const property_sptr  prop)

Add one property to this section.

Parameters
propthe property to add to the section.

Definition at line 833 of file abg-ini.cc.

◆ find_property()

property_sptr find_property ( const string &  prop_name) const

Find a property that has a given name.

Note that this only returns the first property with that name.

Parameters
prop_namethe name of the property to find.
Returns
the found property, or nil if no property with the name prop_name was found.

Definition at line 845 of file abg-ini.cc.

◆ get_name()

const string & get_name ( ) const

Get the name of the section.

Returns
the name of the section.

Definition at line 812 of file abg-ini.cc.

◆ get_properties()

const config::properties_type & get_properties ( ) const

Get the properties of the section.

Returns
a vector of the properties of the section.

Definition at line 819 of file abg-ini.cc.

◆ set_properties()

void set_properties ( const properties_type properties)

Set the properties of the section.

Parameters
propertiesthe new properties to set.

Definition at line 826 of file abg-ini.cc.


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