Stg::Ancestor Class Reference

#include <stage.hh>

Inheritance diagram for Stg::Ancestor:

Public Member Functions

virtual void AddChild (Model *mod)
 
 Ancestor ()
 
void ForEachDescendant (model_callback_t func, void *arg)
 
std::vector< Model * > & GetChildren ()
 
virtual Pose GetGlobalPose () const
 
void * GetProperty (std::string &key)
 
virtual void RemoveChild (Model *mod)
 
void SetProperty (std::string &key, void *value)
 
virtual void SetToken (const std::string &str)
 
const char * Token () const
 
const std::string & TokenStr () const
 
virtual ~Ancestor ()
 

Protected Member Functions

AncestorLoad (Worldfile *wf, int section)
 
void Save (Worldfile *wf, int section)
 

Protected Attributes

std::map< std::string, unsigned int > child_type_counts
 
std::vector< Model * > children
 
bool debug
 
std::map< std::string, void * > props
 
std::string token
 

Detailed Description

Base class for Model and World

Constructor & Destructor Documentation

◆ Ancestor()

Ancestor::Ancestor ( )

◆ ~Ancestor()

Ancestor::~Ancestor ( )
virtual

Member Function Documentation

◆ AddChild()

void Ancestor::AddChild ( Model mod)
virtual

◆ ForEachDescendant()

void Ancestor::ForEachDescendant ( model_callback_t  func,
void *  arg 
)

recursively call func( model, arg ) for each descendant

◆ GetChildren()

std::vector<Model *>& Stg::Ancestor::GetChildren ( )
inline

get the children of the this element

◆ GetGlobalPose()

Pose Ancestor::GetGlobalPose ( ) const
virtual

Reimplemented in Stg::Model.

◆ GetProperty()

void* Stg::Ancestor::GetProperty ( std::string &  key)
inline

A key-value database for users to associate arbitrary things with this model.

◆ Load()

Ancestor & Ancestor::Load ( Worldfile wf,
int  section 
)
protected

◆ RemoveChild()

void Ancestor::RemoveChild ( Model mod)
virtual

Reimplemented in Stg::WorldGui.

◆ Save()

void Ancestor::Save ( Worldfile wf,
int  section 
)
protected

◆ SetProperty()

void Stg::Ancestor::SetProperty ( std::string &  key,
void *  value 
)
inline

A key-value database for users to associate arbitrary things with this model.

◆ SetToken()

virtual void Stg::Ancestor::SetToken ( const std::string &  str)
inlinevirtual

Reimplemented in Stg::Model.

◆ Token()

const char* Stg::Ancestor::Token ( ) const
inline

◆ TokenStr()

const std::string& Stg::Ancestor::TokenStr ( ) const
inline

Member Data Documentation

◆ child_type_counts

std::map<std::string, unsigned int> Stg::Ancestor::child_type_counts
protected

array contains the number of each type of child model

◆ children

std::vector<Model *> Stg::Ancestor::children
protected

◆ debug

bool Stg::Ancestor::debug
protected

◆ props

std::map<std::string, void *> Stg::Ancestor::props
protected

A key-value database for users to associate arbitrary things with this object.

◆ token

std::string Stg::Ancestor::token
protected

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