Xrtti::Context Class Reference

#include <Xrtti.h>

Inheritance diagram for Xrtti::Context:

Xrtti::Namespace Xrtti::Structure Xrtti::Struct Xrtti::Union Xrtti::Class

List of all members.

Public Types

enum  Type { Type_Class = 0, Type_Namespace = 1, Type_Struct = 2, Type_Union = 3 }

Public Member Functions

virtual ~Context ()
bool operator== (const Context &other) const
bool operator!= (const Context &other) const
virtual Type GetType () const =0
virtual const char * GetName () const =0
virtual const char * GetFullName () const =0
virtual const ContextGetContext () const =0


Detailed Description

************************************************************************** An Xrtti::Context is either a namespace or a structure (class, struct, or union)

Member Enumeration Documentation

********************************************************************** This enumerates the valid Context types


Constructor & Destructor Documentation

virtual Xrtti::Context::~Context (  )  [inline, virtual]


Member Function Documentation

bool Xrtti::Context::operator== ( const Context other  )  const

Equality operator - returns true if this object is "functionally equivalent" to [other]. The two objects don't have to be exactly identical, but do have to be identical in every meaningful way. Note also that this doesn't test for equality of any base class members; it is a test only at this level of the inheritence hierarcy. To test if an object is completely equals, including for all of its subclasses defined in the Xrtti hierarchy, you must cast this class to its most derived class and call that method.

Parameters:
other is the other object to compare against
Returns:
true if this object is functionally equal to the other, false if not

Reimplemented in Xrtti::Union, Xrtti::Struct, and Xrtti::Class.

bool Xrtti::Context::operator!= ( const Context other  )  const [inline]

Inequality operator - returns false when the == operator would return true, and vice versa.

Parameters:
other is the other object to compare against
Returns:
false when the == operator would return true, and vice versa.

Reimplemented in Xrtti::Union, Xrtti::Struct, and Xrtti::Class.

virtual Type Xrtti::Context::GetType (  )  const [pure virtual]

Returns the type of this context. The most derived class of this object is determined by the value returned here:

Type_Class: most derived type is Class
Type_Namespace: most derived type is Namespace
Type_Struct: most derived type is Struct
Type_Union: most derived type is Union

Returns:
the type of this context

Implemented in Xrtti::Namespace, Xrtti::Union, Xrtti::Struct, and Xrtti::Class.

Referenced by Xrtti::Class::operator==(), Xrtti::Struct::operator==(), and Xrtti::Union::operator==().

virtual const char* Xrtti::Context::GetName (  )  const [pure virtual]

Returns the name of this context.

Returns:
the name of this context.

virtual const char* Xrtti::Context::GetFullName (  )  const [pure virtual]

Returns the full name of this context. This includes the entire namespace leading up to this context. It is the name of the parent Context prepended to the name of this Context, with a double-colon separator.

Returns:
the full name of this context

virtual const Context* Xrtti::Context::GetContext (  )  const [pure virtual]

This is the parent context of this context. If this is NULL, then this Context is the root Context and has no parent.


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

Generated on Sat Feb 14 22:48:49 2009 by  doxygen 1.5.7.1