Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

celx::GlobalEnvironment Class Reference

#include <environment.h>

Inheritance diagram for celx::GlobalEnvironment:

Inheritance graph
Collaboration diagram for celx::GlobalEnvironment:

Collaboration graph
List of all members.

Public Member Functions

virtual void bind (const std::string &, const Value &)
virtual EnvironmentgetParent () const
 GlobalEnvironment ()
virtual Valuelookup (const std::string &) const
virtual ~GlobalEnvironment ()

Private Attributes

std::map< std::string, Value * > bindings

Constructor & Destructor Documentation

GlobalEnvironment::GlobalEnvironment  ) 
 

Definition at line 26 of file environment.cpp.

00027 {
00028 }

GlobalEnvironment::~GlobalEnvironment  )  [virtual]
 

Definition at line 30 of file environment.cpp.

00031 {
00032 }


Member Function Documentation

void GlobalEnvironment::bind const std::string ,
const Value
[virtual]
 

Implements celx::Environment.

Definition at line 35 of file environment.cpp.

References bindings.

00036 {
00037     bindings.insert(map<string, Value*>::value_type(name, new Value(value)));
00038 }

Environment * GlobalEnvironment::getParent  )  const [virtual]
 

Implements celx::Environment.

Definition at line 50 of file environment.cpp.

00051 {
00052     return NULL;
00053 }

Value * GlobalEnvironment::lookup const std::string  )  const [virtual]
 

Implements celx::Environment.

Definition at line 40 of file environment.cpp.

References bindings.

00041 {
00042     map<string, Value*>::const_iterator iter = bindings.find(name);
00043     if (iter == bindings.end())
00044         return NULL;
00045     else
00046         return iter->second;
00047 }


Member Data Documentation

std::map<std::string, Value*> celx::GlobalEnvironment::bindings [private]
 

Definition at line 44 of file environment.h.

Referenced by bind(), and lookup().


The documentation for this class was generated from the following files:
Generated on Sat Jan 14 22:33:45 2006 for Celestia by  doxygen 1.4.1