00001 00011 #ifndef __CONTAINER_H__ 00012 #define __CONTAINER_H__ 00013 00014 #include <exception.h> 00015 #include <cad/objects/face.h> 00016 00020 typedef Face* Element; 00021 00025 class Container { 00026 public: 00027 // ##### Exceptions ################################################ 00032 class OutOfModelException : Exception { 00033 public: 00037 OutOfModelException() : Exception("Access out of CadModel-Container") {} 00038 }; 00039 00040 // ##### Container ################################################# 00046 virtual void add(Element object)= 0; 00047 00052 virtual unsigned count()= 0; 00053 00059 virtual bool empty()= 0; 00060 00068 virtual bool exist(Element object)= 0; 00069 00076 virtual void first()= 0; 00077 00084 virtual CadObject* getObject() throw (OutOfModelException*)= 0; 00085 00092 virtual bool hasObject()= 0; 00093 00099 virtual void next() throw (OutOfModelException*)= 0; 00100 00104 virtual void print()= 0; 00105 00106 }; // class Container 00107 00108 #endif // ! __CONTAINER_H__