yast2-core
Public Types | Public Member Functions | Private Attributes | List of all members
ModuleEntry Class Reference

One entry in the modules.conf file. More...

#include <ModulesConf.h>

Public Types

enum  Mode { INIT, SET, REINIT }
 
typedef map< const string, string > EntryArg
 
typedef string EntryCom
 

Public Member Functions

 ModuleEntry ()
 
 ~ModuleEntry ()
 
EntryCom getComment () const
 
EntryArg getArgument () const
 
bool setComment (const EntryCom &com, Mode m)
 
bool setArgument (const string arg, Mode m)
 
bool setOption (const string option, const string value, Mode m)
 
bool setOptions (const EntryArg &arg, Mode m)
 
bool Set (Mode m)
 

Private Attributes

EntryCom comment
 
EntryArg argument
 
bool dirtyflag
 

Detailed Description

One entry in the modules.conf file.

This class contains one entry from the modules.conf file.

Author
Michal Svec msvec.nosp@m.@sus.nosp@m.e.cz
Dan Vesely dan@s.nosp@m.use..nosp@m.cz
See Also
ModulesConf

Member Typedef Documentation

typedef map<const string, string> ModuleEntry::EntryArg
typedef string ModuleEntry::EntryCom

Member Enumeration Documentation

Enumerator
INIT 
SET 
REINIT 

Constructor & Destructor Documentation

ModuleEntry::ModuleEntry ( )
inline

Default constructor.

ModuleEntry::~ModuleEntry ( )

Destructor.

Destrucutor

Member Function Documentation

EntryArg ModuleEntry::getArgument ( ) const
inline

Return an entry argument.

Returns
an entry argument

References argument.

ModuleEntry::EntryCom ModuleEntry::getComment ( ) const

Return an entry comment.

Returns
an entry comment

References comment.

bool ModuleEntry::Set ( Mode  m)

Sets dirty_flag. This flag stands for indicating if the entry should be reinitialized if it was modified externally in the file.

Parameters
mIndicates if the operation is provided during (re)initialization or is done by the agent.
Returns
true if the entry can be changed.

Manage the dirty_flag

References dirtyflag, INIT, REINIT, and SET.

Referenced by setArgument(), setOption(), and setOptions().

bool ModuleEntry::setArgument ( const string  arg,
Mode  m 
)

Set an entry argument.

Parameters
argThe entry argument
mIndicates if the option is set during (re)initialization or by an agent.
Returns
if the operation was successful

References argument, MAGIC_ENTRY, Set(), and y2debug.

bool ModuleEntry::setComment ( const EntryCom com,
Mode  m 
)
inline

Set an entry comment.

Parameters
comThe entry comment
mIndicates if the option is set during (re)initialization or by an agent.
Returns
if the operation was successful

References comment.

bool ModuleEntry::setOption ( const string  option,
const string  value,
Mode  m 
)

Set an entry option.

Parameters
optionThe entry option name.
valueThe entry option value.
mIndicates if the option is set during (re)initialization or by an agent.
Returns
if the operation was successful

References argument, MAGIC_ENTRY, Set(), and y2debug.

bool ModuleEntry::setOptions ( const EntryArg arg,
Mode  m 
)

Set entry options.

Parameters
argThe entry options.
mIndicates if the option is set during (re)initialization or by an agent.
Returns
if the operation was successful

References argument, Set(), Y2_RETURN_FALSE, and y2debug.

Member Data Documentation

EntryArg ModuleEntry::argument
private
EntryCom ModuleEntry::comment
private

Referenced by getComment(), and setComment().

bool ModuleEntry::dirtyflag
private

Referenced by Set().


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

Generated on a sunny day for yast2-core by doxygen 1.8.6