Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

InterrogateElement Class Reference

An internal representation of a data element, like a data member or a global variable. More...

#include <interrogateElement.h>

Inheritance diagram for InterrogateElement:

InterrogateComponent List of all members.

Public Member Functions

 InterrogateElement (InterrogateModuleDef *def=NULL)
 InterrogateElement (const InterrogateElement &copy)
void operator= (const InterrogateElement &copy)
bool is_global () const
 Returns true if the element is marked as 'global'.

bool has_scoped_name () const
const string & get_scoped_name () const
TypeIndex get_type () const
bool has_getter () const
FunctionIndex get_getter () const
bool has_setter () const
FunctionIndex get_setter () const
void output (ostream &out) const
 Formats the InterrogateElement data for output to a data file.

void input (istream &in)
 Reads the data file as previously formatted by output().

void remap_indices (const IndexRemapper &remap)
 Remaps all internal index numbers according to the indicated map.

bool has_library_name () const
 Returns true if we have a known library name, false if we do not.

const char * get_library_name () const
 Returns the library name, if it is known, or NULL if it is not.

bool has_module_name () const
 Returns true if we have a known module name, false if we do not.

const char * get_module_name () const
 Returns the module name, if it is known, or NULL if it is not.

bool has_name () const
const string & get_name () const

Private Types

enum  Flags { F_global = 0x0001, F_has_getter = 0x0002, F_has_setter = 0x0004 }

Private Attributes

int _flags
string _scoped_name
TypeIndex _type
FunctionIndex _getter
FunctionIndex _setter

Friends

class InterrogateBuilder

Detailed Description

An internal representation of a data element, like a data member or a global variable.

Definition at line 40 of file interrogateElement.h.


Member Enumeration Documentation

enum InterrogateElement::Flags [private]
 

Enumeration values:
F_global 
F_has_getter 
F_has_setter 

Definition at line 63 of file interrogateElement.h.


Constructor & Destructor Documentation

InterrogateElement::InterrogateElement InterrogateModuleDef def = NULL  )  [inline]
 

Definition at line 31 of file interrogateElement.I.

References _getter, and _setter.

InterrogateElement::InterrogateElement const InterrogateElement &  copy  )  [inline]
 

Definition at line 48 of file interrogateElement.I.

References _flags, _getter, _scoped_name, _setter, _type, INLINE, and InterrogateComponent::operator=().


Member Function Documentation

FunctionIndex InterrogateElement::get_getter  )  const [inline]
 

Definition at line 142 of file interrogateElement.I.

References INLINE, and output().

Referenced by interrogate_element_has_getter().

const char * InterrogateComponent::get_library_name  )  const [inline, inherited]
 

Returns the library name, if it is known, or NULL if it is not.

This is the name of the library that this particular component was built into. Typically this will be a one-to-one correspondance with an invocation of the interrogate command. Typical examples are "libutil" and "liblinmath".

Definition at line 98 of file interrogateComponent.I.

References InterrogateComponent::_def, INLINE, InterrogateModuleDef::module_name, and NULL.

Referenced by InterrogateComponent::operator=().

const char * InterrogateComponent::get_module_name  )  const [inline, inherited]
 

Returns the module name, if it is known, or NULL if it is not.

This is the name of the module that this particular component is associated with. This is a higher grouping than library. Typical examples are "panda" and "pandaegg".

Definition at line 138 of file interrogateComponent.I.

Referenced by interrogate_function_has_module_name(), and interrogate_type_has_module_name().

const string & InterrogateComponent::get_name  )  const [inline, inherited]
 

Definition at line 165 of file interrogateComponent.I.

Referenced by interrogate_function_python_wrapper(), interrogate_get_function(), interrogate_get_manifest_by_name(), interrogate_get_type_by_true_name(), and interrogate_manifest_get_int_value().

const string & InterrogateElement::get_scoped_name  )  const [inline]
 

Definition at line 106 of file interrogateElement.I.

References _flags, F_has_getter, and INLINE.

Referenced by interrogate_element_name().

FunctionIndex InterrogateElement::get_setter  )  const [inline]
 

Definition at line 166 of file interrogateElement.I.

Referenced by interrogate_element_has_setter().

TypeIndex InterrogateElement::get_type  )  const [inline]
 

Definition at line 118 of file interrogateElement.I.

References _getter.

Referenced by interrogate_get_element_by_scoped_name().

bool InterrogateElement::has_getter  )  const [inline]
 

Definition at line 130 of file interrogateElement.I.

Referenced by interrogate_element_type().

bool InterrogateComponent::has_library_name  )  const [inline, inherited]
 

Returns true if we have a known library name, false if we do not.

See get_library_name().

Definition at line 74 of file interrogateComponent.I.

References InterrogateComponent::_def, INLINE, InterrogateModuleDef::library_name, and NULL.

bool InterrogateComponent::has_module_name  )  const [inline, inherited]
 

Returns true if we have a known module name, false if we do not.

See get_module_name().

Definition at line 116 of file interrogateComponent.I.

References InterrogateComponent::_name, and INLINE.

Referenced by interrogate_function_class(), and interrogate_type_comment().

bool InterrogateComponent::has_name  )  const [inline, inherited]
 

Definition at line 153 of file interrogateComponent.I.

bool InterrogateElement::has_scoped_name  )  const [inline]
 

Definition at line 94 of file interrogateElement.I.

References _type, INLINE, and TypeIndex.

bool InterrogateElement::has_setter  )  const [inline]
 

Definition at line 154 of file interrogateElement.I.

Referenced by interrogate_element_getter().

void InterrogateElement::input istream &  in  ) 
 

Reads the data file as previously formatted by output().

Reimplemented from InterrogateComponent.

Definition at line 57 of file interrogateElement.cxx.

References _getter, _setter, _type, and IndexRemapper::map_from().

bool InterrogateElement::is_global  )  const [inline]
 

Returns true if the element is marked as 'global'.

This means only that it should appear in the global element list.

Definition at line 82 of file interrogateElement.I.

References _scoped_name, and INLINE.

Referenced by InterrogateDatabase::get_file_minor_version().

void InterrogateElement::operator= const InterrogateElement &  copy  )  [inline]
 

Definition at line 60 of file interrogateElement.I.

References _flags, F_global, and INLINE.

void InterrogateElement::output ostream &  out  )  const
 

Formats the InterrogateElement data for output to a data file.

Reimplemented from InterrogateComponent.

Definition at line 37 of file interrogateElement.cxx.

Referenced by get_getter().

void InterrogateElement::remap_indices const IndexRemapper remap  ) 
 

Remaps all internal index numbers according to the indicated map.

This called from InterrogateDatabase::remap_indices().

Definition at line 76 of file interrogateElement.cxx.


Friends And Related Function Documentation

friend class InterrogateBuilder [friend]
 

Reimplemented from InterrogateComponent.

Definition at line 75 of file interrogateElement.h.


Member Data Documentation

int InterrogateElement::_flags [private]
 

Definition at line 69 of file interrogateElement.h.

Referenced by get_scoped_name(), InterrogateElement(), operator=(), and InterrogateBuilder::scan_manifest().

FunctionIndex InterrogateElement::_getter [private]
 

Definition at line 72 of file interrogateElement.h.

Referenced by get_type(), input(), InterrogateElement(), and InterrogateBuilder::scan_manifest().

string InterrogateElement::_scoped_name [private]
 

Definition at line 70 of file interrogateElement.h.

Referenced by InterrogateElement(), and is_global().

FunctionIndex InterrogateElement::_setter [private]
 

Definition at line 73 of file interrogateElement.h.

Referenced by input(), and InterrogateElement().

TypeIndex InterrogateElement::_type [private]
 

Definition at line 71 of file interrogateElement.h.

Referenced by has_scoped_name(), input(), and InterrogateElement().


The documentation for this class was generated from the following files:
Generated on Thu May 1 22:13:37 2003 for DTool by doxygen1.3