Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members Related Pages
scope.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 # ifndef OPENVRML_SCOPE_H
00023 # define OPENVRML_SCOPE_H
00024
00025 # include <list>
00026 # include <map>
00027 # include <string>
00028 # include "nodetypeptr.h"
00029 # include "scopeptr.h"
00030
00031 namespace OpenVRML {
00032
00033 class OPENVRML_SCOPE Scope {
00034 friend class Node;
00035
00036 std::list<NodeTypePtr> nodeTypeList;
00037 std::map<std::string, Node *> namedNodeMap;
00038
00039 public:
00040 const std::string id;
00041 const ScopePtr parent;
00042
00043 explicit Scope(const std::string & id,
00044 const ScopePtr & scope = ScopePtr());
00045 virtual ~Scope();
00046
00047 void addNodeType(const NodeTypePtr & nodeType);
00048 const NodeTypePtr findType(const std::string & name) const;
00049 const NodeTypePtr firstType() const;
00050 Node * findNode(const std::string & name) const;
00051
00052 private:
00053
00054 Scope(const Scope &);
00055 Scope & operator=(const Scope &);
00056 };
00057 }
00058
00059 #endif