#include <ExManagerObject.h>
Inheritance diagram for ExManagerObject:

Public Methods | |
| ExManagerObject () | |
| ~ExManagerObject () | |
| void | SetManagerId (ExManagerId *Id) |
| void | Reset (void) |
| void | Init (void) |
| void | Init (std::string FileName) |
| void | List (void) |
| void | Draw (void) |
| bool | Add (TypeA object) |
| bool | Add (std::string FileName) |
| bool | Load (std::string FileName) |
| bool | Remove (ExNihilo::ExId id) |
| bool | Remove (std::string Name) |
| bool | RemoveCurrentObject (void) |
| TypeA * | GetObject (ExNihilo::ExId id) |
| TypeA * | GetObject (std::string Name) |
| TypeA * | GetCurrentObject (void) |
| TypeA * | GetFirstObject (void) |
| TypeA * | GetLasstObject (void) |
| ExNihilo::ExId | GetFirstObjectId (void) |
| ExNihilo::ExId | GetLasstObjectId (void) |
| bool | SetCurrentObject (ExNihilo::ExId id) |
| bool | SetCurrentObject (std::string Name) |
| ExNihilo::ExId | NextObject (void) |
| ExNihilo::ExId | PreviousObject (void) |
| unsigned int | GetNumberObject (void) |
Protected Methods | |
| std::map< ExNihilo::ExId, TypeA, std::less< ExNihilo::ExId > >::iterator | GetIterator (ExNihilo::ExId id) |
| std::map< ExNihilo::ExId, TypeA, std::less< ExNihilo::ExId > >::iterator | GetIterator (std::string Name) |
Protected Attributes | |
| std::map< ExNihilo::ExId, TypeA, std::less< ExNihilo::ExId > > * | m_Map |
| std::map< ExNihilo::ExId, TypeA, std::less< ExNihilo::ExId > >::iterator | m_ItMap |
| ExManagerId * | ManagerId |
| ExNihilo::ExId | m_CurrentObjectId |
|
|
Definition at line 100 of file ExManagerObject.h. References Guard. Referenced by ~ExManagerObject().
00102 {
00103 Guard(ExManagerObject<TypeA>::ExManagerObject(void))
00104
00105 UnGuard
|
|
|
Definition at line 108 of file ExManagerObject.h. References ExManagerObject(), and Guard.
00110 {
00111 Guard(ExManagerObject<TypeA>::~ExManagerObject(void))
00112 UnGuard
|
|
|
Reimplemented in ExManagerMenu, and ExManagerTexture. Definition at line 194 of file ExManagerObject.h. References Add(), Guard, and Load().
00196 {
00197 Guard(bool ExManagerObject<TypeA>::Add(std::string FileName))
00198 return Load(FileName);
00199 UnGuard
|
|
|
Reimplemented in ExManagerMenu, and ExManagerTexture. Definition at line 158 of file ExManagerObject.h. References ExManager::Consol, Guard, m_Map, ManagerId, and ExManagerId::RecordObject(). Referenced by ExManagerTexture::Add(), Add(), ExManagerMenu::Add(), ExManagerCamera::Add(), ExManagerParticuleSystem::Load(), Load(), ExManagerModel::Load3DS(), ExManagerModel::LoadASC(), and ExManagerModel::LoadMD2().
00160 {
00161 Guard(bool ExManagerObject<TypeA>::Add(TypeA object))
00162 try
00163 {
00164 //Ask ManagerId for Aviable Id and Avialbe name
00165 //object.SetIdName(ManagerId->GetNewIdName(object.GetName()));
00166
00167 std::pair<ExNihilo::ExId,TypeA> obj;
00168 obj.first=ManagerId->RecordObject(object);
00169 obj.second=object;
00170 m_Map->insert(obj);
00171 return true;
00172 }
00173 catch(ExCExpRecordObject)
00174 {
00175 *Consol<<"Managerobject:: Exception record object"<<std::endl;
00176 return false;
00177 }
00178 catch(...)
00179 {
00180 *Consol<<"Managerobject:: Exception add object"<<std::endl;
00181 return false;
00182 }
00183 UnGuard
|
|
|
Reimplemented in ExManagerCamera, ExManagerGizmo, ExManagerInterface, ExManagerLight, ExManagerMenu, ExManagerModel, ExManagerParticuleSystem, and ExManagerSpirit. Definition at line 71 of file ExManagerObject.h.
00072 {};
|
|
|
Reimplemented in ExManagerCamera, and ExManagerModel. Definition at line 244 of file ExManagerObject.h. References GetObject(), Guard, and m_CurrentObjectId.
00246 {
00247 Guard(TypeA * ExManagerObject<TypeA>::GetCurrentObject(void))
00248 return GetObject(m_CurrentObjectId);
00249 UnGuard
|
|
|
|
|
|
|
|
|
Definition at line 260 of file ExManagerObject.h. References GetIterator(), ExManagerId::GetObjectId(), Guard, m_ItMap, and ManagerId.
00262 {
00263 Guard(... iterator ExManagerObject<TypeA>::GetIterator(std::string Name))
00264 return GetIterator(ManagerId->GetObjectId(Name,typeid(&m_ItMap->second).name()));
00265 UnGuard
|
|
|
Definition at line 252 of file ExManagerObject.h. Referenced by GetIterator().
00254 {
00255 Guard(... iterator ExManagerObject<TypeA>::GetIterator(ExNihilo::ExId id))
00256 return m_Map->find(id);
00257 UnGuard
|
|
|
|
|
|
|
|
|
Definition at line 94 of file ExManagerObject.h.
00095 {return m_Vec->size();}
|
|
|
Definition at line 236 of file ExManagerObject.h. References GetObject(), ExManagerId::GetObjectId(), Guard, m_ItMap, and ManagerId.
00238 {
00239 Guard(TypeA * ExManagerObject<TypeA>::GetObject(std::string Name))
00240 return GetObject(ManagerId->GetObjectId(Name,typeid(&m_ItMap->second).name()));
00241 UnGuard
|
|
|
Reimplemented in ExManagerCamera, and ExManagerModel. Definition at line 227 of file ExManagerObject.h. Referenced by GetCurrentObject(), GetObject(), and SetCurrentObject().
|
|
|
Reimplemented in ExManagerTexture. Definition at line 134 of file ExManagerObject.h.
00136 {
00137 Guard(void ExManagerObject<TypeA>::Init(std::string FileName))
00138 UnGuard
|
|
|
Reimplemented from ExManager. Reimplemented in ExManagerCamera, ExManagerFont, ExManagerGizmo, ExManagerInterface, ExManagerLight, ExManagerMenu, ExManagerModel, ExManagerParticuleSystem, ExManagerSound, ExManagerSpirit, and ExManagerTexture. Definition at line 125 of file ExManagerObject.h. References Guard, m_CurrentObjectId, and m_Map. Referenced by ExManagerTexture::Init(), ExManagerSpirit::Init(), ExManagerSound::Init(), ExManagerParticuleSystem::Init(), Init(), ExManagerModel::Init(), ExManagerMenu::Init(), ExManagerLight::Init(), ExManagerInterface::Init(), ExManagerGizmo::Init(), ExManagerFont::Init(), and ExManagerCamera::Init().
00127 {
00128 Guard(void ExManagerObject<TypeA>::Init(void))
00129 m_CurrentObjectId=-1;
00130 m_Map=new std::map< ExNihilo::ExId , TypeA , std::less <ExNihilo::ExId > >;
00131 UnGuard
|
|
|
Reimplemented in ExManagerModel. Definition at line 141 of file ExManagerObject.h. References ExManager::Consol, Guard, m_CurrentObjectId, m_ItMap, and m_Map.
00143 {
00144 Guard(void ExManagerObject<TypeA>::List(void))
00145 *Consol<<"---------------List of Object Type :"<<typeid(&m_ItMap->second).name()<<"--------------"<<std::endl;
00146 for(m_ItMap=m_Map->begin();m_ItMap!=m_Map->end();m_ItMap++)
00147 {
00148 *Consol<<" Id:"<<m_ItMap->second.GetId()<<" Name :"<<m_ItMap->second.GetName()<<std::endl;
00149 }
00150 *Consol<<"-----------------------------------------------------------------"<<std::endl;
00151 *Consol<<" Number Total of Object : "<<m_Map->size()<<std::endl;
00152 *Consol<<" Current Object Id : "<<m_CurrentObjectId<<std::endl;
00153 *Consol<<"-----------------------------------------------------------------"<<std::endl;
00154
00155 UnGuard
|
|
|
Reimplemented in ExManagerInterface, ExManagerMenu, ExManagerModel, ExManagerParticuleSystem, and ExManagerTexture. Definition at line 186 of file ExManagerObject.h. Referenced by Add().
00188 {
00189 Guard(bool ExManagerObject<TypeA>::Load(std::string FileName))
00190 return Add(TypeA(FileName));
00191 UnGuard
|
|
|
Definition at line 285 of file ExManagerObject.h. References Guard, m_CurrentObjectId, and m_Map.
00287 {
00288 Guard(ExNihilo::ExId ExManagerObject<TypeA>::NextObject(void))
00289 if(m_Map->upper_bound(m_CurrentObjectId)==m_Map->end())
00290 {
00291 m_CurrentObjectId=m_Map->begin()->first;
00292 }else
00293 {
00294 m_CurrentObjectId=m_Map->upper_bound(m_CurrentObjectId)->first;
00295 }
00296 return m_CurrentObjectId;
00297 UnGuard
|
|
|
Definition at line 300 of file ExManagerObject.h. References Guard, m_CurrentObjectId, m_ItMap, and m_Map.
00302 {
00303 Guard(ExNihilo::ExId ExManagerObject<TypeA>::PreviousObject(void))
00304 if(m_Map->begin()->first==m_CurrentObjectId)
00305 {
00306 m_CurrentObjectId=m_Map->rbegin()->first;
00307 }else
00308 {
00309 m_ItMap=m_Map->find(m_CurrentObjectId);
00310 m_ItMap--;
00311 m_CurrentObjectId=m_ItMap->first;
00312 }
00313 return m_CurrentObjectId;
00314 UnGuard
|
|
|
Definition at line 211 of file ExManagerObject.h. References ExManagerId::GetObjectId(), Guard, ManagerId, and Remove().
00213 {
00214 Guard(bool ExManagerObject<TypeA>::Remove(std::string Name))
00215 return Remove(ManagerId->GetObjectId(Name,typeid(&TypeA)));
00216 UnGuard
|
|
|
Definition at line 202 of file ExManagerObject.h. References Guard, m_CurrentObjectId, and m_Map. Referenced by Remove(), and RemoveCurrentObject().
00204 {
00205 Guard(bool ExManagerObject<TypeA>::Remove(ExNihilo::ExId id))
00206 if(0==m_Map->erase(id))return false;
00207 else{if(m_CurrentObjectId==id)m_CurrentObjectId=-1;return true;}
00208 UnGuard
|
|
|
Definition at line 219 of file ExManagerObject.h. References Guard, m_CurrentObjectId, and Remove().
00221 {
00222 Guard(bool ExManagerObject<TypeA>::RemoveCurrentObject(void))
00223 return Remove(m_CurrentObjectId);
00224 UnGuard
|
|
|
Reimplemented from ExManager. Reimplemented in ExManagerCamera, ExManagerFont, ExManagerGizmo, ExManagerInterface, ExManagerLight, ExManagerMenu, ExManagerModel, ExManagerParticuleSystem, ExManagerSound, ExManagerSpirit, and ExManagerTexture. Definition at line 116 of file ExManagerObject.h. References Guard, m_CurrentObjectId, and m_Map. Referenced by ExManagerTexture::Reset(), ExManagerSpirit::Reset(), ExManagerSound::Reset(), ExManagerParticuleSystem::Reset(), ExManagerModel::Reset(), ExManagerMenu::Reset(), ExManagerLight::Reset(), ExManagerInterface::Reset(), ExManagerGizmo::Reset(), and ExManagerCamera::Reset().
00118 {
00119 Guard(void ExManagerObject<TypeA>::Reset(void))
00120 m_CurrentObjectId=-1;
00121 m_Map->clear();
00122 UnGuard
|
|
|
Reimplemented in ExManagerTexture. Definition at line 277 of file ExManagerObject.h. References ExManagerId::GetObjectId(), Guard, m_ItMap, ManagerId, and SetCurrentObject().
00279 {
00280 Guard(bool ExManagerObject<TypeA>::SetCurrentObject(std::string Name))
00281 return SetCurrentObject(ManagerId->GetObjectId(Name,typeid(&m_ItMap->second).name()));
00282 UnGuard
|
|
|
Reimplemented in ExManagerTexture. Definition at line 268 of file ExManagerObject.h. References GetObject(), Guard, and m_CurrentObjectId. Referenced by SetCurrentObject().
00270 {
00271 Guard(bool ExManagerObject<TypeA>::SetCurrentObject(ExNihilo::ExId id))
00272 if(GetObject(id)!=NULL)m_CurrentObjectId=id;return true;
00273 return false;
00274 UnGuard
|
|
|
Definition at line 65 of file ExManagerObject.h.
00066 {ManagerId = Id;}
|
|
|
Definition at line 50 of file ExManagerObject.h. Referenced by GetCurrentObject(), Init(), List(), NextObject(), PreviousObject(), Remove(), RemoveCurrentObject(), Reset(), and SetCurrentObject(). |
|
|
Definition at line 47 of file ExManagerObject.h. Referenced by GetIterator(), GetObject(), List(), PreviousObject(), and SetCurrentObject(). |
|
|
Definition at line 46 of file ExManagerObject.h. Referenced by Add(), GetIterator(), GetObject(), Init(), List(), NextObject(), PreviousObject(), Remove(), and Reset(). |
|
|
Definition at line 49 of file ExManagerObject.h. Referenced by Add(), GetIterator(), GetObject(), Remove(), and SetCurrentObject(). |
1.3-rc1