Aegis  4.25.D505
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions
introspector Class Reference

#include <introspector.h>

Inheritance diagram for introspector:
introspector_boolean introspector_enumeration introspector_error introspector_integer introspector_nstring introspector_real introspector_string introspector_structure introspector_time

Public Types

typedef aegis_shared_ptr
< introspector
pointer

Public Member Functions

virtual ~introspector ()
virtual void integer (long n)
virtual void real (double n)
virtual void string (const nstring &text)
virtual void enumeration (const nstring &name)
virtual pointer list ()
virtual pointer field (const nstring &name)
virtual nstring get_name () const =0

Protected Member Functions

 introspector ()
void error (sub_context_ty *scp, const char *text)
void value_of_type_required ()

Private Member Functions

 introspector (const introspector &)
introspectoroperator= (const introspector &)

Detailed Description

The introspector class is used to represent the ability to reach into a variable and manipulate it. This is exploited by the meta-data parser to enable it to set various fields within a meta-data structure.

Definition at line 33 of file introspector.h.


Member Typedef Documentation

Reimplemented in introspector_structure.

Definition at line 36 of file introspector.h.


Constructor & Destructor Documentation

virtual introspector::~introspector ( ) [virtual]

The destructor.

introspector::introspector ( ) [protected]

The default constructor. It is protected on purpose, only derived classes may call it.

introspector::introspector ( const introspector ) [private]

The copy constructor. Do not use.


Member Function Documentation

virtual void introspector::enumeration ( const nstring name) [virtual]

The enumeration method is called when the parser sees a name in an enumeration tag place.

Parameters:
nameThe name of the enumerand.

Reimplemented in introspector_enumeration, introspector_boolean_by_method< T >, and introspector_error.

void introspector::error ( sub_context_ty scp,
const char *  text 
) [protected]

The error method is a helper which proxies errors to the global lex_error function, for reporting error messages. (Reduces include explosion.)

Parameters:
scpsubstitution context
textthe text of the error message
virtual pointer introspector::field ( const nstring name) [virtual]

The field method is called when the parser sees the start of a name=value field.

Parameters:
nameThe name of the field.

Reimplemented in introspector_structure, and introspector_error.

virtual nstring introspector::get_name ( ) const [pure virtual]

The get_name mathod is used to get the name of the type of value the introspector is managing. Used in error messages.

Implemented in introspector_enumeration, introspector_time, introspector_structure, introspector_integer, introspector_real, introspector_nstring, introspector_string, introspector_boolean, and introspector_error.

virtual void introspector::integer ( long  n) [virtual]

The integer method is called by the parser when an integer value is seen.

Parameters:
nThe value of the number.

Reimplemented in introspector_time, introspector_integer, introspector_real, and introspector_error.

virtual pointer introspector::list ( ) [virtual]

The list method is called when the parser sees the start of a list value.

Reimplemented in introspector_error.

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

The assignment operator. Do not use.

virtual void introspector::real ( double  n) [virtual]

The real method is called by the parser when a floating point value is seen.

Parameters:
nThe value of the number.

Reimplemented in introspector_time, introspector_integer, introspector_real, and introspector_error.

virtual void introspector::string ( const nstring text) [virtual]

The string method is called by the parser when a string value is seen.

Parameters:
textThe value of the string constant.

Reimplemented in introspector_nstring, introspector_string, and introspector_error.

The value_of_type_integer_required method is used to emit the "value of type <name> required" error message.


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