00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef PEEKABOT_MODEL_OBJECT_HH_INCLUDED
00024 #define PEEKABOT_MODEL_OBJECT_HH_INCLUDED
00025
00026
00027 #include "SceneObject.hh"
00028 #include "ScalableObject.hh"
00029 #include "ObjectVisitor.hh"
00030 #include "HandlerInformer.hh"
00031 #include "Path.hh"
00032
00033 #include <string>
00034
00035
00036 namespace peekabot
00037 {
00038 class ScopedHandler;
00039
00045 class ModelObject : public SceneObject, public ScalableObject
00046 {
00047 public:
00052 ModelObject(const Path &model_path);
00053
00056 ModelObject(ScopedHandler *handler);
00057
00062
00063
00064 virtual void accept(ObjectVisitor* visitor) throw();
00065
00066 virtual ObjectType get_object_type() const;
00067
00068 const Path &get_model_path() const;
00069
00070 void set_model_path(const Path &path);
00071
00072 protected:
00073 virtual PropMap &get_prop_adapters();
00074
00075 private:
00076 static void create_prop_adapters(PropMap &adapters);
00077
00080
00083 static void start_handler(
00084 const std::string & name,
00085 XMLHandler::AttributeMap &attributes,
00086 ScopedHandler *handler) throw();
00087
00090 void file_start_handler(
00091 const std::string & name,
00092 XMLHandler::AttributeMap &attributes,
00093 ScopedHandler *handler) throw();
00094
00097 void file_cdata_handler(
00098 const std::string &cdata,
00099 ScopedHandler *handler);
00100
00102
00103 private:
00104 Path m_model_path;
00105
00106 static HandlerInformer ms_handler_informer;
00107 };
00108 }
00109
00110
00111 #endif // PEEKABOT_MODEL_OBJECT_HH_INCLUDED