/home/tetron/hack/vos/libs/vos/csplugin/vosmodel.hh
Go to the documentation of this file.00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 00002 $Id: vosmodel.h,v 1.6 2006/01/26 06:07:37 tetron Exp $ 00003 00004 This file is part of Crystal Space Virtual Object System Abstract 00005 3D Layer plugin (csvosa3dl). 00006 00007 Copyright (C) 2004 Peter Amstutz 00008 00009 This program is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU Lesser General Public License as published by 00011 the Free Software Foundation; either version 2 of the License, or 00012 (at your option) any later version. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 */ 00023 00024 #ifndef _VOSMODEL_H_ 00025 #define _VOSMODEL_H_ 00026 00027 #include <vos/metaobjects/a3dl/model.hh> 00028 #include <vos/metaobjects/a3dl/actor.hh> 00029 #include "ivosa3dl.hh" 00030 #include "csvosa3dl.hh" 00031 #include "vosobject3d.hh" 00032 00033 class csMetaModel : public virtual csMetaObject3D, 00034 public virtual A3DL::Model, 00035 public virtual A3DL::ActionListener 00036 { 00037 private: 00038 bool alreadyLoaded; 00039 csRef<iDataBuffer> databuf; 00040 std::string modeldatatype; 00041 A3DL::ActionEvent::EventType eventType; 00042 std::string action; 00043 bool valid; 00044 boost::mutex model_data_mutex; 00045 00046 public: 00047 csMetaModel(VOS::VobjectBase* superobject); 00048 00049 static VOS::MetaObject* new_csMetaModel(VOS::VobjectBase* superobject, 00050 const std::string& type); 00051 00052 virtual void Setup(csVosA3DL* vosa3dl, csVosSector* sect); 00053 virtual void notifyActionChange(const A3DL::ActionEvent& ae); 00054 00055 std::string getModelDatatype() { return modeldatatype; } 00056 csRef<iDataBuffer> getDatabuf(); 00057 A3DL::ActionEvent::EventType getEventType() { return eventType; } 00058 std::string getAction() { return action; } 00059 00060 virtual void notifyChildInserted(VOS::VobjectEvent& e); 00061 virtual void notifyChildRemoved(VOS::VobjectEvent& e); 00062 00063 virtual void notifyPropertyChange(const VOS::PropertyEvent& event); 00064 }; 00065 00066 #endif