vValue::Expr::Bindings::Legacy::ConfItem Class Reference

stores a pointer to a configuration item and gets the value from it More...

#include <vebLegacy.h>

Inheritance diagram for vValue::Expr::Bindings::Legacy::ConfItem:

Inheritance graph
[legend]
Collaboration diagram for vValue::Expr::Bindings::Legacy::ConfItem:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ConfItem (tString const &value)
 Basic constructor.
 ConfItem (ConfItem const &other)
 Copy constructor.
void operator= (ConfItem const &other)
 overloaded assignment operator
bool Good () const
 Was the configuration item found?
Basecopy (void) const
virtual ~ConfItem ()
virtual Variant GetValue (void) const
 Returns the value in its native format.
virtual tString GetString (Base const *other=0) const

Private Member Functions

tString Read () const
 Reads the value from the configuration item.

Private Attributes

tConfItemBasem_value
 pointer to the configuration item that contains the value


Detailed Description

stores a pointer to a configuration item and gets the value from it

Definition at line 136 of file vebLegacy.h.


Constructor & Destructor Documentation

vValue::Expr::Bindings::Legacy::ConfItem::ConfItem ( tString const &  value  ) 

Basic constructor.

Searches the right configuration item and uses it if it finds it

Parameters:
value the name of the configuration item to be searched for

Definition at line 50 of file vebLegacy.cpp.

Referenced by copy().

00050                                       :
00051         Base(),
00052         m_value(tConfItemBase::FindConfigItem(value))
00053 { }

Here is the caller graph for this function:

vValue::Expr::Bindings::Legacy::ConfItem::ConfItem ( ConfItem const &  other  ) 

Copy constructor.

Initializes the ConfItem object using the information from another one

Parameters:
other another ConfItem object

Definition at line 57 of file vebLegacy.cpp.

00057                                        :
00058         Base(other),
00059         m_value(other.m_value)
00060 { }

virtual vValue::Expr::Bindings::Legacy::ConfItem::~ConfItem (  )  [inline, virtual]

Definition at line 147 of file vebLegacy.h.

00147 { };


Member Function Documentation

tString vValue::Expr::Bindings::Legacy::ConfItem::Read (  )  const [private]

Reads the value from the configuration item.

Reads from the Configuration item

Returns:
the result as a string

Definition at line 41 of file vebLegacy.cpp.

References m_value, tASSERT, and tConfItemBase::WriteVal().

Referenced by GetString().

00041                              {
00042     tASSERT(m_value);
00043     std::ostringstream ret("");
00044     m_value->WriteVal(ret);
00045     return(ret.str());
00046 }

Here is the call graph for this function:

Here is the caller graph for this function:

void vValue::Expr::Bindings::Legacy::ConfItem::operator= ( ConfItem const &  other  ) 

overloaded assignment operator

Does nothing different than the default assignment operator, but gets rid of a compiler warning

Parameters:
other the ConfItem to be copied

Definition at line 70 of file vebLegacy.cpp.

References m_value.

00070                                               {
00071     this->Base::operator=(other);
00072     m_value=other.m_value;
00073 }

bool vValue::Expr::Bindings::Legacy::ConfItem::Good (  )  const

Was the configuration item found?

Tests if the search for the right configuration item at construction time was successful

Returns:
true on success, false on failure (read operations will segfault)

Definition at line 77 of file vebLegacy.cpp.

References m_value.

00077                           {
00078     return m_value != 0;
00079 }

Base * vValue::Expr::Bindings::Legacy::ConfItem::copy ( void   )  const [virtual]

Overwritten copy function

Returns:
a new copy of the current object

Reimplemented from vValue::Expr::Core::Base.

Definition at line 64 of file vebLegacy.cpp.

References ConfItem().

00064                                {
00065     return new ConfItem(*this);
00066 }

Here is the call graph for this function:

Variant vValue::Expr::Bindings::Legacy::ConfItem::GetValue ( void   )  const [virtual]

Returns the value in its native format.

Reimplemented from vValue::Expr::Core::Base.

Definition at line 81 of file vebLegacy.cpp.

References GetString().

00081                                  {
00082     return GetString();
00083 }

Here is the call graph for this function:

tString vValue::Expr::Bindings::Legacy::ConfItem::GetString ( Base const *  other = 0  )  const [virtual]

Reads from the configuration item

Returns:
the result as a string

Reimplemented from vValue::Expr::Core::Base.

Definition at line 87 of file vebLegacy.cpp.

References vValue::Expr::Core::Base::Output(), and Read().

Referenced by GetValue().

00087                                                    {
00088     return Output(Read(), other);
00089 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

tConfItemBase* vValue::Expr::Bindings::Legacy::ConfItem::m_value [private]

pointer to the configuration item that contains the value

Definition at line 137 of file vebLegacy.h.

Referenced by Good(), operator=(), and Read().


The documentation for this class was generated from the following files:
Generated on Sun Mar 16 00:05:34 2008 for Armagetron Advanced by  doxygen 1.5.4