00001 /*
00002 File: SLLibrary.h
00003
00004 Function: A library for scene objects: objects can be added and
00005 retrieved by name. Different libraries can be handed to
00006 scene construction / reading code in order to build
00007 scenes with an internal structure specific to a particular
00008 rendering / illumination method.
00009
00010 Author(s): Andrew Willmott
00011
00012 Copyright: (c) 1995-2000, Andrew Willmott
00013 */
00014
00015
00016 #ifndef __SLLibrary__
00017 #define __SLLibrary__
00018
00019 #include "gcl/SceneObjects.h"
00020 #include "cl/Hash.h"
00021
00022
00023 class SLLibrary : public Hash
00024 {
00025 public:
00026 SLLibrary();
00027
00028 virtual Void Create();
00030
00031 Void AddMember(scScenePtr objectPtr);
00032 Void AddMember(StrConst name, scPrimitive *objectPtr);
00033 Bool MemberExists(StrConst name);
00034 Void DeleteMember(StrConst name);
00035 scPrimitive *Member(StrConst name);
00039 protected:
00040 Void FreeData(Void *obj);
00041 String name;
00042 };
00043
00044 ostream &operator << (ostream &s, SLLibrary &library);
00045
00046 #endif