ModuleEntry Class Reference

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

#include <ModulesConf.h>

List of all members.

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@suse.cz>

Dan Vesely <dan@suse.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:
m Indicates 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:
arg The entry argument
m Indicates 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:
com The entry comment
m Indicates 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:
option The entry option name.
value The entry option value.
m Indicates 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:
arg The entry options.
m Indicates 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

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.5.9