rpt_value_pstate Class Reference

#include <pstate.h>

Inheritance diagram for rpt_value_pstate:

rpt_value

Public Member Functions

virtual ~rpt_value_pstate ()

Static Public Member Functions

static rpt_value::pointer create (const nstring &name)
static rpt_value::pointer create (string_ty *name)

Protected Member Functions

const char * name () const
bool is_a_struct () const
rpt_value::pointer lookup (const rpt_value::pointer &rhs, bool lvalue) const
rpt_value::pointer keys () const
rpt_value::pointer count () const
rpt_value::pointer undefer_or_null () const
const char * type_of () const

Private Member Functions

 rpt_value_pstate (const nstring &pname)
void grab () const
 rpt_value_pstate ()
 rpt_value_pstate (const rpt_value_pstate &)
rpt_value_pstateoperator= (const rpt_value_pstate &)

Private Attributes

nstring pname
rpt_value::pointer value

Detailed Description

The rpt_value_pstate class is used to represet the internal state of a project. The meta-data load is deferred, to avoid reading in meta-data which is not actually used.

Definition at line 31 of file pstate.h.


Constructor & Destructor Documentation

virtual rpt_value_pstate::~rpt_value_pstate (  )  [virtual]

The destructor.

rpt_value_pstate::rpt_value_pstate ( const nstring pname  )  [private]

The constructor. It is private on purpose, use the "create" class method instead.

Parameters:
pname The name of the project

rpt_value_pstate::rpt_value_pstate (  )  [private]

The default constructor. Do not use.

rpt_value_pstate::rpt_value_pstate ( const rpt_value_pstate  )  [private]

The copy constructor. Do not use.


Member Function Documentation

static rpt_value::pointer rpt_value_pstate::create ( const nstring name  )  [static]

The create class method is used to create new dynamically allocated instances of this class.

Parameters:
pname The name of the project

static rpt_value::pointer rpt_value_pstate::create ( string_ty name  )  [static]

The create class method is used to create new dynamically allocated instances of this class.

Parameters:
pname The name of the project

const char* rpt_value_pstate::name (  )  const [protected, virtual]

The name method is used to obtain the name of the type of the value.

Implements rpt_value.

bool rpt_value_pstate::is_a_struct (  )  const [protected, virtual]

The is_a_struct method may be used to determine whether or not the value is a struct (or associative array). Superficially, this should be simple, but it is complicated by things like deferred project and change states.

Returns:
true of struct-like values, false for everything else

Reimplemented from rpt_value.

rpt_value::pointer rpt_value_pstate::lookup ( const rpt_value::pointer rhs,
bool  lvalue 
) const [protected, virtual]

The lookup method is used to index an associate array, or locate a member within a struct.

Parameters:
rhs The member name, or array index
lvalue The result is to be used of an l-value

Reimplemented from rpt_value.

rpt_value::pointer rpt_value_pstate::keys (  )  const [protected, virtual]

The keys method is used to obtain a list of keys of an associative array.

Reimplemented from rpt_value.

rpt_value::pointer rpt_value_pstate::count (  )  const [protected, virtual]

The count method is used to count the number of elements of an associative array.

Reimplemented from rpt_value.

rpt_value::pointer rpt_value_pstate::undefer_or_null (  )  const [protected, virtual]

The undefer_or_null method is used to evaluate a deferred value, if necessary, or return NULL if it is not possible or not necessary. This NULL is used by the undefer class method to return the unchanged value if no conversion is possible.

Reimplemented from rpt_value.

const char* rpt_value_pstate::type_of (  )  const [protected, virtual]

The type_of method is used to obtain the name of the type of the value. It differs from the name method in that it resolves references and deferred values.

Reimplemented from rpt_value.

void rpt_value_pstate::grab (  )  const [private]

The grab method is used to read in the meta-data and convert it.

rpt_value_pstate& rpt_value_pstate::operator= ( const rpt_value_pstate  )  [private]

The assignment operator. Do not use.


Field Documentation

The pname instance variable is used to remember the name of the project of interest. This is used when un-defering the value.

Definition at line 96 of file pstate.h.

The value instance variable is used to remember the rpt_value_* tree form of the project meta-data. It is mutable because the deferred load does not alter the semantic value of the object.

Definition at line 103 of file pstate.h.


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

Generated on Wed Mar 12 23:37:44 2008 for Aegis by  doxygen 1.5.5