Page principale   Liste des namespaces   Hiérarchie des classes   Liste par ordre alphabétique   Liste des composants   Liste des fichiers   Membres des namespaces   Composants   Déclarations  

Référence de la classe ExManagerTexture

#include <ExManagerTexture.h>

Graphe d'héritage de la classe ExManagerTexture

ExManagerObject< ExCTexture > ExManager

Membres publics

void Reset (void)
void Init (void)
bool Init (std::string FileName)
bool Load (std::string FileName)
bool Add (std::string FileName)
bool Add (ExCTexture object)
bool CheckExist (std::string name)
bool SetCurrentObject (std::string Name)
bool SetCurrentObject (ExNihilo::ExId id)
GLint GetTextureId (std::string Name)
GLint GetTextureId (ExNihilo::ExId id)
ExCAction InputAction (ExCAction Action)

Membres publics statiques

ExManagerTexture * CreateSingleton (void)

Membres privés

 ExManagerTexture (void)
 ~ExManagerTexture (void)

Attributs Privés Statiques

bool m_flag = false
ExManagerTexture * m_instance = NULL

Documentation des contructeurs et destructeurs

ExManagerTexture void    [private]
 

Définition à la ligne 43 du fichier ExManagerTexture.cpp.

Références ExManagerTexture(), et Guard.

Référencé par ExManagerTexture(), et ~ExManagerTexture().

00044 {
00045 Guard(ExManagerTexture::ExManagerTexture(void))
00046         
00047 UnGuard
00048 }

~ExManagerTexture void    [private]
 

Définition à la ligne 51 du fichier ExManagerTexture.cpp.

Références ExManagerTexture(), et Guard.

00052 {
00053 Guard(ExManagerTexture::~ExManagerTexture(void))
00054 UnGuard
00055 }


Documentation des méthodes

bool Add ExCTexture    object
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 127 du fichier ExManagerTexture.cpp.

Références ExManagerObject::Add(), Add(), CheckExist(), ExCObject::GetName(), et Guard.

00128 {
00129 Guard(ExManagerTexture::Add(ExCTexture object))
00130         if(!CheckExist(object.GetName())){return true;}
00131         return ExManagerObject<ExCTexture>::Add(object);
00132 UnGuard
00133 }

bool Add std::string    FileName
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 120 du fichier ExManagerTexture.cpp.

Références Add(), Guard, et Load().

Référencé par Add(), Load(), ExCComposed::LoadAsc(), ExCInterface::LoadFile(), ExCMap::LoadMap(), et ExManagerConsole::SetConsoleBackGroudTexture().

00121 {
00122 Guard(ExManagerTexture::Add(std::string FileName))
00123         return Load(FileName);
00124 UnGuard
00125 }

bool CheckExist std::string    name
 

Définition à la ligne 81 du fichier ExManagerTexture.cpp.

Références CheckExist(), ExManagerId::GetObjectId(), Guard, et ExManagerObject< ExCTexture >::ManagerId.

Référencé par Add(), CheckExist(), et Load().

00082 {
00083 Guard(ExManagerTexture::CheckExist(std::string  name))
00084         if(name.find(".")<name.length())//if extension remove them
00085         {
00086                 name.erase(name.find("."),name.length()-name.find("."));
00087         }
00088         if(ManagerId->GetObjectId(name,typeid(ExCTexture).name())==-1)return true;
00089         return false;
00090 UnGuard
00091 }

ExManagerTexture * CreateSingleton void    [static]
 

Définition à la ligne 29 du fichier ExManagerTexture.cpp.

Références CreateSingleton(), Guard, m_flag, et m_instance.

Référencé par CreateSingleton(), et main().

00029                                                        {
00030 Guard(ExManagerTexture* ExManagerTexture::CreateSingleton(void))
00031         if(!m_flag)
00032         {
00033                 m_flag = true; // We are creating the error log now, so set flag to true
00034                 m_instance = new ExManagerTexture; // Create the error log
00035         }else
00036         {
00037                 std::cout<<"Error singleton already created"<<std::endl;
00038         }
00039         return m_instance; 
00040 UnGuard
00041 }

GLint GetTextureId ExNihilo::ExId    id
 

Définition à la ligne 207 du fichier ExManagerTexture.cpp.

Références ExManagerObject< ExCTexture >::GetObject(), GetTextureId(), Guard, ExManagerObject< ExCTexture >::m_CurrentObjectId, et ExCTexture::m_Texture.

00208 {
00209 Guard(ExManagerTexture::GetTextureId(ExNihilo::ExId id))
00210         if(GetObject(id)!=NULL)
00211         {
00212                 m_CurrentObjectId=id;
00213                 try
00214                 {       
00215                         return GetObject(m_CurrentObjectId)->m_Texture;
00216                         //std::cout<<"ExManagerTexture ::"<<Name<<" Current object"<<std::endl;
00217                         }catch(...)
00218                         {
00219                                 std::cout<<"ExManagerTexture ::Exception can make :"<<m_CurrentObjectId<<" Current object"<<std::endl;
00220                                 return -1;
00221                         }
00222         }
00223         return -1;
00224 UnGuard
00225 }

GLint GetTextureId std::string    Name
 

Définition à la ligne 182 du fichier ExManagerTexture.cpp.

Références ExManagerObject< ExCTexture >::GetObject(), ExManagerId::GetObjectId(), GetTextureId(), Guard, Load(), ExManagerObject< ExCTexture >::m_CurrentObjectId, ExCTexture::m_Texture, et ExManagerObject< ExCTexture >::ManagerId.

Référencé par GetTextureId(), et ExCSystemeParticule::SetParticuleTexture().

00183 {
00184 Guard(ExManagerTexture::GetTextureId(std::string Name))
00185         
00186         if(Name.find(".")<Name.length())//if extension remove them
00187         {
00188                 Name.erase(Name.find("."),Name.length()-Name.find("."));
00189         }
00190         try
00191         {       
00192                 m_CurrentObjectId=ManagerId->GetObjectId(Name,typeid(ExCTexture).name());
00193                 return GetObject(m_CurrentObjectId)->m_Texture;
00194                 //std::cout<<"ExManagerTexture ::"<<Name<<" Current object"<<std::endl;
00195         }catch(...)
00196         {
00197                 if(!Load(Name))
00198                 {
00199                         std::cout<<"ExManagerTexture ::Exception can make :"<<Name<<" Current object"<<std::endl;
00200                         return -1;
00201                 }
00202                 return -1;
00203         }
00204 UnGuard
00205 }

bool Init std::string    FileName
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 72 du fichier ExManagerTexture.cpp.

Références Guard, et Init().

00073 {
00074 Guard(bool  ExManagerTexture::Init(std::string FileName))
00075         //openf file and load object
00076 
00077         return true;
00078 UnGuard
00079 }

void Init void    [virtual]
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 57 du fichier ExManagerTexture.cpp.

Références Guard, ExManagerObject::Init(), et Init().

Référencé par Init(), et InitManager().

00058 {
00059 Guard(void  ExManagerTexture::Init(void))
00060         ExManagerObject<ExCTexture>::Init();
00061 //      Add("back.bmp");
00062 UnGuard
00063 }

ExCAction InputAction ExCAction    Action [virtual]
 

Redéfinie à partir de ExManager.

Définition à la ligne 228 du fichier ExManagerTexture.cpp.

Références Guard, InputAction(), ExManagerObject< ExCTexture >::List(), LOAD_TEXTURE, ExCAction::m_Action, ExCAction::m_NextAction, et UNLOAD_TEXTURE.

Référencé par InputAction().

00229 {
00230 Guard(ExCAction ExManagerTexture::InputAction(ExCAction Action))
00231         switch(Action.m_Action)
00232         {
00233         case LIST_TEXTURE:
00234                 List();
00235                 break;
00236         case LOAD_TEXTURE:
00237                 break;
00238         case UNLOAD_TEXTURE:
00239                 break;
00240         }
00241         if(Action.m_NextAction){return *Action.m_NextAction;}
00242         else{return NOTHING;}
00243 UnGuard
00244 }

bool Load std::string    FileName
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 94 du fichier ExManagerTexture.cpp.

Références Add(), CheckExist(), ExManager::Consol, Guard, et Load().

Référencé par Add(), GetTextureId(), Load(), ExCModelMD2::Load(), ExCMap::LoadMap(), ExCModel3DS::ReadFace(), SetCurrentObject(), et ExCSystemeParticule::SetParticuleTexture().

00095 {
00096 Guard(ExManagerTexture::Load(std::string FileName))
00097         if(FileName.find(".")<FileName.length())//if extension remove them
00098         {
00099                 FileName.erase(FileName.find("."),FileName.length()-FileName.find("."));
00100         }
00101         if(!CheckExist(FileName)){return true;}
00102         
00103         try
00104         {
00105                 return  Add(ExCTexture(FileName));
00106         }catch(ExCExpFileNotFound)
00107         {
00108                 *Consol<<"Exception file not found texture not added"<<std::endl;
00109                 return false;
00110         }
00111         catch(ExCExpNullPointer)
00112         {
00113                 *Consol<<"Exception null pointer texture not added"<<std::endl;
00114                 return false;
00115         }
00116         
00117 UnGuard
00118 }

void Reset void    [virtual]
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 65 du fichier ExManagerTexture.cpp.

Références Guard, ExManagerObject::Reset(), et Reset().

Référencé par ExManagerCommand::ProcesExCAction(), et Reset().

00066 {
00067 Guard(void  ExManagerTexture::Reset(void))
00068         ExManagerObject<ExCTexture>::Reset();
00069 UnGuard
00070 }

bool SetCurrentObject ExNihilo::ExId    id
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 161 du fichier ExManagerTexture.cpp.

Références ExManagerObject< ExCTexture >::GetObject(), Guard, ExManagerObject< ExCTexture >::m_CurrentObjectId, et SetCurrentObject().

00162 {
00163 Guard(ExManagerTexture::SetCurrentObject(ExNihilo::ExId id))
00164         if(GetObject(id)!=NULL)
00165         {
00166                 m_CurrentObjectId=id;
00167                 try
00168                 {       
00169                         glBindTexture(GL_TEXTURE_2D,GetObject(m_CurrentObjectId)->m_Texture);
00170                         return true;
00171                         //std::cout<<"ExManagerTexture ::"<<Name<<" Current object"<<std::endl;
00172                         }catch(...)
00173                         {
00174                                 std::cout<<"ExManagerTexture ::Exception can make :"<<m_CurrentObjectId<<" Current object"<<std::endl;
00175                                 return false;
00176                         }
00177         }
00178         return false;
00179 UnGuard
00180 }

bool SetCurrentObject std::string    Name
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 135 du fichier ExManagerTexture.cpp.

Références ExManagerObject< ExCTexture >::GetObject(), ExManagerId::GetObjectId(), Guard, Load(), ExManagerObject< ExCTexture >::m_CurrentObjectId, ExManagerObject< ExCTexture >::ManagerId, et SetCurrentObject().

Référencé par ExCModelASC::BuildList(), ExCModel3DS::BuildList(), ExCMap::BuildSkyBox(), ExCOctree::BuilList(), ExCMap::BuilList(), ExManagerConsole::Draw(), ExCModelMD2::Draw(), ExCInterface::Draw(), ExCEntite::DrawWithoutList(), ExCMap::LoadMap(), et SetCurrentObject().

00136 {
00137 Guard(ExManagerTexture::SetCurrentObject(std::string Name))
00138         
00139         if(Name.find(".")<Name.length())//if extension remove them
00140         {
00141                 Name.erase(Name.find("."),Name.length()-Name.find("."));
00142         }
00143         try
00144         {       
00145                 m_CurrentObjectId=ManagerId->GetObjectId(Name,typeid(ExCTexture).name());
00146                 glBindTexture(GL_TEXTURE_2D,GetObject(m_CurrentObjectId)->m_Texture);
00147                 return true;
00148                 //std::cout<<"ExManagerTexture ::"<<Name<<" Current object"<<std::endl;
00149         }catch(...)
00150         {
00151                 if(!Load(Name))
00152                 {
00153                         std::cout<<"ExManagerTexture ::Exception can make :"<<Name<<" Current object"<<std::endl;
00154                         return true;
00155                 }
00156                 return false;
00157         }
00158 UnGuard
00159 }


Documentation des données imbriquées

bool m_flag = false [static, private]
 

Définition à la ligne 26 du fichier ExManagerTexture.cpp.

Référencé par CreateSingleton().

ExManagerTexture * m_instance = NULL [static, private]
 

Définition à la ligne 27 du fichier ExManagerTexture.cpp.

Référencé par CreateSingleton().


La documentation associée à cette classe a été générée à partir des fichiers suivants :
Généré le Tue Dec 10 18:18:48 2002 pour ExNihilo par doxygen1.3-rc1