00001
00002
00003
00004
00007
00009
00010 #ifndef __PROTOTYPEVECTOR_H__
00011 #define __PROTOTYPEVECTOR_H__
00012 #include "ProtoDeclaration.h"
00013
00014 using namespace std;
00015
00016 namespace H3D {
00017 namespace X3D {
00018
00019 class PrototypeVector: public AutoPtrVector< ProtoDeclaration > {
00020 public:
00021 PrototypeVector(): first_proto( NULL ) {}
00022 ProtoDeclaration *getProtoDeclaration( const string & name ) {
00023 for( PrototypeVector::iterator i = begin(); i != end(); i++ ) {
00024 if( (*i)->getName() == name )
00025 return *i;
00026 }
00027 return NULL;
00028 }
00029 inline ProtoDeclaration *getFirstProtoDeclaration() {
00030 return first_proto;
00031 }
00032
00033 inline void setFirstProtoDeclaration( ProtoDeclaration *pd ) {
00034 first_proto = pd;
00035 }
00036 protected:
00037 ProtoDeclaration *first_proto;
00038 };
00039 }
00040 };
00041
00042 #endif
00043