JC::SConfig::Pair Class Reference

Class that represents a Key-Value Pair. More...

#include <sconfig.hpp>

Collaboration diagram for JC::SConfig::Pair:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Pair (const string &key="", const string &value="")
 Default constructor.
 Pair (const Pair &pair)
 ~Pair ()
Pairoperator= (const Pair &old)
void CopyTo (Pair &target) const
 Creates a valid copy of the actual object.
void Clear ()
 Resets private members.
const PairNextSibling () const
 Gets the next Pair sibling.
PairNextSibling ()
const PairNextSibling (const string &name) const
 Gets the next Pair sibling with a specific key value.
PairNextSibling (const string &name)
const PairPreviousSibling () const
 Gets the previous Pair sibling.
PairPreviousSibling ()
const PairPreviousSibling (const string &name) const
 Gets the previous Pair sibling with a specific key value.
PairPreviousSibling (const string &name)
const string & Key () const
 Gets the key.
const string & Value () const
 Gets the value.
void Key (const string &key)
 Sets the key.
void Value (const string &value)
 Sets the value.
const NodeParentNode () const
 Gets the parent Node.
NodeParentNode ()

Private Attributes

string m_Key
string m_Value
Nodem_Node
Pairm_NextSibling
Pairm_PreviousSibling

Friends

class Node


Detailed Description

Class that represents a Key-Value Pair.

Constructor & Destructor Documentation

Pair::Pair ( const string &  key = "",
const string &  value = "" 
)

Default constructor.

Parameters:
key string for Pair's key.
value string for Pair's value.

Pair::Pair ( const Pair pair  ) 

JC::SConfig::Pair::~Pair (  )  [inline]


Member Function Documentation

Pair & Pair::operator= ( const Pair old  ) 

void Pair::CopyTo ( Pair target  )  const

Creates a valid copy of the actual object.

Parameters:
target the destination where to copy the object.

void Pair::Clear (  ) 

Resets private members.

const Pair * Pair::NextSibling (  )  const

Gets the next Pair sibling.

Returns:
A pointer to the next sibling or NULL if there are no siblings left.

Pair * Pair::NextSibling (  ) 

const Pair * Pair::NextSibling ( const string &  name  )  const

Gets the next Pair sibling with a specific key value.

Parameters:
name the Pair's key value to search for.
Returns:
A pointer to the next sibling, with the specified key name, or NULL if there are no siblings left with that key.

Pair * Pair::NextSibling ( const string &  name  ) 

const Pair * Pair::PreviousSibling (  )  const

Gets the previous Pair sibling.

Returns:
A pointer to the previous sibling or NULL if there are no siblings left.

Pair * Pair::PreviousSibling (  ) 

const Pair * Pair::PreviousSibling ( const string &  name  )  const

Gets the previous Pair sibling with a specific key value.

Parameters:
name the Pair's key value to search for.
Returns:
A pointer to the previous sibling, with the specified key name, or NULL if there are no siblings left with that key.

Pair * Pair::PreviousSibling ( const string &  name  ) 

const string & Pair::Key (  )  const

Gets the key.

Returns:
the key.

const string & Pair::Value (  )  const

Gets the value.

Returns:
the value.

void Pair::Key ( const string &  key  ) 

Sets the key.

Parameters:
key the string to set.

void Pair::Value ( const string &  value  ) 

Sets the value.

Parameters:
value the string to set.

const Node * Pair::ParentNode (  )  const

Gets the parent Node.

Returns:
pointer to parent Node.

Node * Pair::ParentNode (  ) 


Friends And Related Function Documentation

friend class Node [friend]


Member Data Documentation

string JC::SConfig::Pair::m_Key [private]

string JC::SConfig::Pair::m_Value [private]


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

Generated on Fri Apr 3 16:53:54 2009 for libsconfig by  doxygen 1.5.6