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 ExManagerConsole

#include <ExManagerConsole.h>

Graphe d'héritage de la classe ExManagerConsole

ExManager

Membres publics

void SetManagerWindow (ExManagerWindow *Window)
void SetManagerTexture (ExManagerTexture *Texture)
void ClearConsol (void)
void Reset (void)
void Write (const char *)
void Draw (void)
void Init (void)
int NextAviableState (void)
void SetConsoleState (int state)
int GetConsoleState (void)
void ConsoleMove (bool)
bool isConsoleMove (void)
void SetConsoleBackGroudTexture (std::string FileName)
void SetConsoleBackGroudTextureState (bool state)
void SetConsoleBackGroudBlendingState (bool state)
void SetConsoleBackGroudBlending (float blending)
void SetConsoleBackGroudColorRed (float value)
void SetConsoleBackGroudColorGreen (float value)
void SetConsoleBackGroudColorBlue (float value)
void SetConsoleBackGroudColor (float R, float G, float B)
void LoadStringActionFile (const char *FileName)
ExCAction InputCommand (ExCCommand Command)
void ListConsoleCommand (void)
void LineUp (void)
void LineDown (void)
ExCAction InputAction (ExCAction Action)
void SetFlux (std::ostrstream *consol, ExCFluxAction *action)
bool GetStatus (void)
void SetStatus (bool status)
void SetAskForCommand (bool status)
void SetAskForExclusifCommand (bool status)
bool AskForCommand (void)
bool AskForExclusifCommand (void)
virtual void Reload (void)

Membres publics statiques

ExManagerConsoleCreateSingleton (void)

Attributs Publics

std::ostrstream * Consol
ExCFluxActionFluxAction

Attributs Protégés

bool m_Status
bool m_AskForCommand
bool m_Exclusif

Types Privés

typedef std::pair< std::string,
int > 
StringAction

Membres privés

void AddStringAction (std::string String, int Action)
void AddStringAction (StringAction StrAction)
ExCAction ApplyBuffCommand (void)
void WriteInDaFile (std::string str)
void UpdateConsolBuffer (void)
 ExManagerConsole (void)
 ~ExManagerConsole (void)

Attributs Privés

ExManagerWindowManagerWindow
ExManagerTextureManagerTexture
int m_ConsoleState
int m_LineCounter
int m_ConsoleTrans
int m_NextConsoleState
int m_ConsoleTransPalier
bool console_move
int m_Move
bool LogConsol
bool m_BackGroundTextureState
bool m_Blending
float m_fBlending
float m_fBackGroundBlue
float m_fBackGroundRed
float m_fBackGroundGreen
int m_LineToStar
int m_LineInConsol
std::ofstream logfilecsl
int PosIntoBuffOldCommand
std::string m_BackGroundTexture
std::string m_BuffCommand
std::vector< std::string > m_BuffOldCommand
std::vector< StringActionm_VecStringAction
std::vector< StringAction
>::iterator 
m_ItVecStringAction
std::vector< std::string > m_BufferConsol
std::vector< std::string
>::reverse_iterator 
m_RItBufferConsol
std::vector< std::string
>::iterator 
m_ItBufferConsol
float TabTextures [8]
float TabVertices [8]

Attributs Privés Statiques

bool m_flag = false
ExManagerConsolem_instance = NULL

Documentation des types imbriqués

typedef std::pair<std::string,int> ExManagerConsole::StringAction [private]
 

Définition à la ligne 114 du fichier ExManagerConsole.h.

Référencé par AddStringAction(), et LoadStringActionFile().


Documentation des contructeurs et destructeurs

ExManagerConsole::ExManagerConsole void   )  [private]
 

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

Références console_move, ExManagerConsole(), Guard, HIDE, LogConsol, logfilecsl, ExManager::m_AskForCommand, m_BackGroundTextureState, m_Blending, m_ConsoleState, m_ConsoleTransPalier, m_fBackGroundBlue, m_fBackGroundGreen, m_fBackGroundRed, m_fBlending, m_LineCounter, m_Move, PosIntoBuffOldCommand, ExManager::SetAskForCommand(), ExManager::SetAskForExclusifCommand(), ExManager::SetStatus(), TabTextures, TabVertices, et UnGuard.

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

00044 {
00045 Guard(ExManagerConsole::ExManagerConsole(void))
00046         m_ConsoleState=HIDE;
00047         m_LineCounter=2;
00048         PosIntoBuffOldCommand=0;
00049         m_ConsoleTransPalier=20;
00050         m_fBlending=0.3f;
00051         m_fBackGroundBlue=1.0f;
00052         m_fBackGroundRed=1.0f;
00053         m_fBackGroundGreen=1.0f;
00054         console_move = false;
00055         m_BackGroundTextureState=true;
00056         m_Blending = false;
00057         LogConsol =true;
00058         m_AskForCommand=true;
00059         m_Move=0;
00060         #ifdef UNIX_SRC
00061         logfilecsl.open("/tmp/logConsol.txt",std::ios::out);
00062         #else
00063         logfilecsl.open("logConsol.txt",std::ios::out);
00064         #endif
00065         logfilecsl.close();
00066         SetStatus(false);
00067         SetAskForCommand(false);
00068         SetAskForExclusifCommand(false);
00069 
00070         TabTextures[0]=0;
00071         TabTextures[2]=0;TabTextures[3]=0;
00072         TabTextures[4]=1;TabTextures[5]=0;
00073         TabTextures[6]=1;
00074 
00075         TabVertices[0]=0;TabVertices[1]=0;
00076         TabVertices[2]=0;
00077         TabVertices[7]=0;
00078 
00079 UnGuard
00080 }

ExManagerConsole::~ExManagerConsole void   )  [private]
 

Définition à la ligne 97 du fichier ExManagerConsole.cpp.

Références ExManagerConsole(), Guard, et UnGuard.

00098 {
00099 Guard(ExManagerConsole::~ExManagerConsole(void))
00100 UnGuard
00101 }


Documentation des méthodes

void ExManagerConsole::AddStringAction StringAction  StrAction  )  [private]
 

Définition à la ligne 719 du fichier ExManagerConsole.cpp.

Références AddStringAction(), Guard, StringAction, et UnGuard.

00720 {
00721 Guard(void ExManagerConsole::AddStringAction(StringAction StrAction))
00722         AddStringAction(StrAction.first.data(),StrAction.second);
00723 UnGuard
00724 }

void ExManagerConsole::AddStringAction std::string  String,
int  Action
[private]
 

Définition à la ligne 708 du fichier ExManagerConsole.cpp.

Références AddStringAction(), ExManager::Consol, Guard, m_VecStringAction, StringAction, et UnGuard.

Référencé par AddStringAction(), et LoadStringActionFile().

00709 {
00710 Guard(void ExManagerConsole::AddStringAction(std::string String,int Action))
00711         StringAction ac;
00712         ac.first=String;
00713         ac.second=Action;
00714         m_VecStringAction.push_back(ac);
00715         *Consol<<"Add new command to console command:"<<String<<" Action:"<<Action<<std::endl;
00716 UnGuard
00717 }

ExCAction ExManagerConsole::ApplyBuffCommand void   )  [private]
 

Définition à la ligne 584 du fichier ExManagerConsole.cpp.

Références ApplyBuffCommand(), ClearConsol(), ExManager::Consol, Guard, ListConsoleCommand(), LOAD_FILE, ExCAction::m_Action, m_BuffCommand, m_BufferConsol, m_BuffOldCommand, m_ItVecStringAction, ExCAction::m_StartingLife, m_VecStringAction, NOTHING, PREDIFINEDCOMMAND, QUIT, RESET, ExCAction::SetParam(), et UnGuard.

Référencé par ApplyBuffCommand(), et InputCommand().

00585 {
00586 Guard(ExCAction ExManagerConsole::ApplyBuffCommand(void))
00587 bool findaction=false;
00588         ExCAction Action;
00589         Action.m_StartingLife=(double)((double)glutGet(GLUT_ELAPSED_TIME)/1000);
00590         *Consol<<m_BuffCommand.data()<<std::endl;
00591         for(m_ItVecStringAction=m_VecStringAction.begin();m_ItVecStringAction!=m_VecStringAction.end();m_ItVecStringAction++)
00592         {
00593                 if(m_BuffCommand.find(m_ItVecStringAction->first.data())==0)
00594                 {                        
00595                         findaction=true;
00596                         char buffer[255];
00597                         memset(buffer,0,255);
00598                         Action.m_Action=m_ItVecStringAction->second;
00599                         m_BuffCommand.copy(buffer,(m_BuffCommand.size())-(strlen(m_ItVecStringAction->first.data())),strlen(m_ItVecStringAction->first.data()));
00600                         Action.SetParam(buffer);
00601                         m_BuffOldCommand.push_back(m_BuffCommand);
00602                         m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00603                 }           
00604         }
00605         if(!findaction)
00606         {
00607                 if(strcmp(m_BuffCommand.data(),"clear")==0)
00608                 {
00609                         m_BuffOldCommand.push_back(m_BuffCommand);
00610                         m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00611                         m_BufferConsol.clear();
00612                         ClearConsol();
00613                         Action.m_Action= NOTHING;
00614                         return Action;
00615                 }
00616                 
00617                 if(m_BuffCommand.find("help")==0)
00618                 {
00619                         ListConsoleCommand();
00620                         m_BuffOldCommand.push_back(m_BuffCommand);
00621                         m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00622                         Action.m_Action= NOTHING;
00623                         return Action;
00624                 }
00625                 if(m_BuffCommand.find("Extension")==0)
00626                 {
00627                         *Consol<<"Extension      :"<<glGetString(GL_EXTENSIONS)<<std::endl;
00628                         m_BuffOldCommand.push_back(m_BuffCommand);
00629                         m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00630                         Action.m_Action= NOTHING;
00631                         return Action;
00632                 }
00633                 if(m_BuffCommand.find("cmd ")==0)
00634                 {
00635                         int cmd=0;
00636                         char *SBuffer;
00637                         SBuffer=new char[strlen(m_BuffCommand.data())-5] ;
00638                         memset(SBuffer,0,strlen(m_BuffCommand.data()));
00639                         m_BuffCommand.copy(SBuffer,m_BuffCommand.size()-4,4);
00640                         m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00641                         try
00642                         {
00643                                 cmd=atoi(SBuffer);
00644                                 Action.m_Action= m_VecStringAction.at(cmd-PREDIFINEDCOMMAND).second;
00645                         }catch(...)
00646                         {
00647                                 *Consol<<"Bad argument use list to show command list"<<std::endl;
00648                                 Action.m_Action= NOTHING;
00649                                 return Action;
00650                         }
00651                 }
00652 
00653                 if(m_BuffCommand.find("run ")==0)
00654                 {
00655                         // stay ton fin space between each param and put it into action
00656                         if (m_BuffCommand.size()<5) 
00657                         {
00658                                 *Consol<<"run command need one argument"<<std::endl;
00659                         }
00660                         try
00661                         {
00662                                 char *SBuffer;
00663                                 SBuffer=new char[strlen(m_BuffCommand.data())-4] ;
00664                                 m_BuffCommand.copy(SBuffer,m_BuffCommand.size()-4,m_BuffCommand.find("run ")+4);
00665                                 Action.m_Action= atoi(SBuffer);
00666                         }catch(...){Action.m_Action= NOTHING;}
00667                         m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00668                         return Action;
00669                 }
00670 
00671                 if(strcmp(m_BuffCommand.data(),"quit")==0)
00672                 {
00673                         m_BuffOldCommand.push_back(m_BuffCommand);
00674                         m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00675                         Action.m_Action= QUIT;
00676                         return Action;
00677                 }
00678                 
00679                 if(strcmp(m_BuffCommand.data(),"reset")==0)
00680                 {
00681                         m_BuffOldCommand.push_back(m_BuffCommand);
00682                         m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00683                         Action.m_Action= RESET;
00684                         return Action;
00685                 }
00686 
00687                 if(m_BuffCommand.find("load")!=(unsigned)-1)
00688                 {
00689                         char buffer[255];
00690                         memset(buffer,0,255);
00691                         Action.m_Action=LOAD_FILE;
00692                         m_BuffCommand.copy(buffer,m_BuffCommand.size()-4,4);
00693                         Action.SetParam(buffer);
00694                         m_BuffOldCommand.push_back(m_BuffCommand);
00695                         m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00696                         return Action;
00697                 }
00698                 
00699                 *Consol<<"Unknow command"<<std::endl;
00700                 m_BuffOldCommand.push_back(m_BuffCommand);
00701                 m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00702                 Action.m_Action= NOTHING;
00703         }
00704         return Action;
00705 UnGuard
00706 }

bool ExManager::AskForCommand void   )  [inline, inherited]
 

Définition à la ligne 89 du fichier ExManager.h.

Références ExManager::m_AskForCommand.

Référencé par ExManagerCommand::InputCommand().

00089 {return m_AskForCommand;}

bool ExManager::AskForExclusifCommand void   )  [inline, inherited]
 

Définition à la ligne 90 du fichier ExManager.h.

Références ExManager::m_Exclusif.

Référencé par ExManagerCommand::InputCommand().

00090 {return m_Exclusif;}

void ExManagerConsole::ClearConsol void   ) 
 

Définition à la ligne 762 du fichier ExManagerConsole.cpp.

Références ClearConsol(), Guard, m_BuffCommand, m_BufferConsol, m_BuffOldCommand, et UnGuard.

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

00763 {
00764 Guard(void ExManagerConsole::ClearConsol(void))
00765         m_BuffOldCommand.push_back(m_BuffCommand);
00766         m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00767         m_BufferConsol.clear();
00768 UnGuard
00769 }

void ExManagerConsole::ConsoleMove bool   ) 
 

Définition à la ligne 374 du fichier ExManagerConsole.cpp.

Références console_move.

Référencé par InputAction().

00374                                           {
00375         console_move = p;
00376 }

ExManagerConsole * ExManagerConsole::CreateSingleton void   )  [static]
 

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

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

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

00029                                                        {
00030 Guard(ExManagerConsole* ExManagerConsole::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 ExManagerConsole; // Create the error log
00035         }else
00036         {
00037                 std::cout<<"Error singleton already created"<<std::endl;
00038         }
00039         return m_instance; 
00040 UnGuard
00041 }

void ExManagerConsole::Draw void   ) 
 

Définition à la ligne 121 du fichier ExManagerConsole.cpp.

Références console_move, Draw(), ExNihilo::EnterOrthoMode(), FULL, FULLTOHALF, FULLTOHIDE, ExManagerWindow::GetResolutionX(), ExManagerWindow::GetResolutionY(), ExManager::GetStatus(), Guard, HALF, HALFTOFULL, HALFTOHIDE, HIDE, HIDETOFULL, HIDETOHALF, ExNihilo::LeaveOrthoMode(), LineDown(), LineUp(), m_BackGroundTexture, m_BackGroundTextureState, m_Blending, m_BuffCommand, m_BufferConsol, m_ConsoleState, m_ConsoleTrans, m_ConsoleTransPalier, m_fBackGroundBlue, m_fBackGroundGreen, m_fBackGroundRed, m_fBlending, m_LineToStar, m_Move, m_NextConsoleState, m_RItBufferConsol, ManagerTexture, ManagerWindow, ExNihilo::RenderBitmapString(), ExManagerTexture::ResetMultitexture(), ExManagerTexture::SetCurrentObject(), ExManager::SetStatus(), ExManagerTexture::SetTexture(), TabTextures, TabVertices, UnGuard, UpdateConsolBuffer(), et VERSION.

Référencé par Draw(), et ExManagerOutput::DrawScene().

00122 {
00123 Guard(void ExManagerConsole::Draw(void))
00124         if(!GetStatus())return;
00125         int i=0;
00126         float   textcoordy=0;
00127         float   cordy=0;
00128         char buffer[80];
00129         sprintf(buffer,"version %s ",VERSION);
00130         
00131 
00132 
00133         switch(m_ConsoleState)
00134         {
00135         case HIDE:
00136                 SetStatus(false);
00137                 break;
00138 
00139         case HALF:
00140                 textcoordy=0.5f;
00141                 cordy=ManagerWindow->GetResolutionY()/2;
00142                 break;
00143 
00144         case FULL:
00145                 textcoordy=1.0f;
00146                 cordy=ManagerWindow->GetResolutionY();
00147                 break;
00148 
00149         case HIDETOHALF:
00150                 //cout<<"Draw hide to half "<<endl;
00151                 textcoordy=(1.0f/m_ConsoleTransPalier)*m_ConsoleTrans;
00152                 cordy=(ManagerWindow->GetResolutionY()/m_ConsoleTransPalier)*m_ConsoleTrans;
00153                 m_ConsoleTrans++;
00154                 if(cordy>((ManagerWindow->GetResolutionY()/2)-(ManagerWindow->GetResolutionY()/m_ConsoleTransPalier)))
00155                 {
00156                         m_ConsoleState=m_NextConsoleState;
00157                 }
00158                 break;
00159 
00160         case HIDETOFULL:
00161                 //cout<<"Draw hide to full "<<endl;
00162                 textcoordy=((1.0f/m_ConsoleTransPalier)*m_ConsoleTrans);
00163                 cordy=(ManagerWindow->GetResolutionY()/m_ConsoleTransPalier)*m_ConsoleTrans;
00164                 m_ConsoleTrans++;
00165                 if(cordy>(ManagerWindow->GetResolutionY()))
00166                 {
00167                         m_ConsoleState=m_NextConsoleState;
00168                 }
00169                 break;
00170 
00171         case HALFTOFULL:
00172                 //cout<<"Draw half to full"<<endl;
00173                 textcoordy=((1.0f/m_ConsoleTransPalier)*m_ConsoleTrans)+0.5f;
00174                 cordy=((ManagerWindow->GetResolutionY()/m_ConsoleTransPalier)*m_ConsoleTrans)+ManagerWindow->GetResolutionY()/2;
00175                 m_ConsoleTrans++;
00176                 if(cordy>(ManagerWindow->GetResolutionY()))
00177                 {
00178                         m_ConsoleState=m_NextConsoleState;
00179                 }
00180                 break;
00181 
00182         case FULLTOHIDE:
00183                 //cout<<"Draw full to hide"<<endl;
00184                 textcoordy=1.0f-((1.0f/m_ConsoleTransPalier)*m_ConsoleTrans);
00185                 cordy=ManagerWindow->GetResolutionY()-((ManagerWindow->GetResolutionY()/m_ConsoleTransPalier)*m_ConsoleTrans);
00186                 m_ConsoleTrans++;
00187                 if(cordy<0)
00188                 {
00189                         m_ConsoleState=m_NextConsoleState;
00190                 }
00191                 break;
00192 
00193         case FULLTOHALF:
00194                 //cout<<"Draw full to half"<<endl;
00195                 textcoordy=1.0f-((1.0f/m_ConsoleTransPalier)*m_ConsoleTrans);
00196                 cordy=(ManagerWindow->GetResolutionY())-((ManagerWindow->GetResolutionY()/m_ConsoleTransPalier)*m_ConsoleTrans);
00197                 m_ConsoleTrans++;
00198                 if(cordy<ManagerWindow->GetResolutionY()/2)
00199                 {
00200                         m_ConsoleState=m_NextConsoleState;
00201                 }
00202                 break;
00203  
00204         case HALFTOHIDE:
00205                 //cout<<"Draw half to hide"<<endl;
00206                 textcoordy=0.5f-((1.0f/m_ConsoleTransPalier)*m_ConsoleTrans);
00207                 cordy=(ManagerWindow->GetResolutionY()/2)-((ManagerWindow->GetResolutionY()/m_ConsoleTransPalier)*m_ConsoleTrans);
00208                 m_ConsoleTrans++;
00209                 if(cordy<0)
00210                 {
00211                         m_ConsoleState=m_NextConsoleState;
00212                 }
00213                 break;
00214         }
00215         //-------------------
00216         //Draw back console
00217         //-------------------
00218         if(m_Move>0)LineUp();
00219         if(m_Move<0)LineDown();
00220 
00221         ExNihilo::EnterOrthoMode();
00222         glPushAttrib(GL_ALL_ATTRIB_BITS);
00223         if(m_BackGroundTextureState)glEnable(GL_TEXTURE_2D);
00224         glDisable(GL_LIGHTING);
00225         glDisable(GL_DEPTH_TEST);
00226         ManagerTexture->SetCurrentObject(m_BackGroundTexture);
00227         if(m_Blending)
00228         {
00229                 glColor4f(m_fBackGroundRed,m_fBackGroundGreen,m_fBackGroundBlue,m_fBlending);
00230                 glEnable(GL_BLEND);
00231                 glEnable(GL_ALPHA);
00232                 glBlendFunc(GL_ONE,GL_ONE);
00233                 glEnable(GL_ALPHA_TEST);
00234                 glAlphaFunc(GL_GREATER,0);
00235                 glDisable(GL_LIGHTING);
00236         }else
00237         {
00238                 glColor4f(1,1,1,1);
00239         }
00240 
00241         TabTextures[1]=textcoordy;
00242         TabTextures[7]=textcoordy;
00243 
00244 
00245         TabVertices[3]=cordy;
00246         TabVertices[4]=ManagerWindow->GetResolutionX();
00247         TabVertices[5]=cordy;
00248         TabVertices[6]=ManagerWindow->GetResolutionX();
00249 
00250                 glMatrixMode(GL_TEXTURE);
00251                         glTranslatef(0.0f,-0.0001*glutGet(GLUT_ELAPSED_TIME),0.0f);
00252                 glMatrixMode(GL_MODELVIEW);             
00253                 ManagerTexture->SetTexture(0,"back3");
00254                 glTexCoordPointer(2,GL_FLOAT,0,TabTextures);
00255                 ManagerTexture->SetTexture(1,m_BackGroundTexture);
00256                 glTexCoordPointer(2,GL_FLOAT,0,TabTextures);
00257 
00258                 glEnableClientState(GL_VERTEX_ARRAY);
00259                 glVertexPointer(2,GL_FLOAT,0,TabVertices);
00260                 glDrawArrays( GL_QUADS, 0, 4 );
00261                 ManagerTexture->ResetMultitexture();
00262                 glMatrixMode(GL_TEXTURE);
00263                 glLoadIdentity();
00264                 glMatrixMode(GL_MODELVIEW);
00265         glPopAttrib();
00266 
00267     //-------------------
00268         //Draw credits
00269         //-------------------
00270         glColor4f(0,0,1,1);
00271         
00272         ExNihilo::RenderBitmapString(ManagerWindow->GetResolutionX()-160,cordy-40,GLUT_BITMAP_8_BY_13,"ExNihilo Engine ");
00273         ExNihilo::RenderBitmapString(ManagerWindow->GetResolutionX()-160,cordy-30,GLUT_BITMAP_8_BY_13,buffer);
00274         ExNihilo::RenderBitmapString(ManagerWindow->GetResolutionX()-160,cordy-20,GLUT_BITMAP_8_BY_13,"Plok Software");
00275         //-------------------
00276         //Draw buffer console
00277         //-------------------
00278         glColor3f(0.5,0,0);
00279         
00280         UpdateConsolBuffer();
00281 
00282 
00283         for(i=0,m_RItBufferConsol=m_BufferConsol.rbegin();i<m_LineToStar;i++)
00284         {
00285                 m_RItBufferConsol++;    
00286         }
00287 
00288         for(i=0;m_RItBufferConsol!=m_BufferConsol.rend();m_RItBufferConsol++,i++)
00289         {
00290                 ExNihilo::RenderBitmapString(10,cordy-(10*i)-20,GLUT_BITMAP_8_BY_13,m_RItBufferConsol->data()); 
00291                 if(i*10>cordy)break;
00292         }
00293         
00294         m_BufferConsol.clear();
00295         
00296         //--------------------
00297         //Draw Current Command
00298         //--------------------
00299         ExNihilo::RenderBitmapString(10,cordy-10,GLUT_BITMAP_8_BY_13,"]"+m_BuffCommand);
00300 
00301         glEnable(GL_DEPTH_TEST);
00302         glEnable(GL_LIGHTING);
00303         glDisable(GL_TEXTURE_2D);
00304 
00305         ExNihilo::LeaveOrthoMode();     
00306         
00307         if (m_ConsoleState == m_NextConsoleState && console_move == true) {
00308                 console_move = false;
00309         }
00310         
00311         //DrawBuffer(); 
00312 UnGuard
00313 }

int ExManagerConsole::GetConsoleState void   )  [inline]
 

Définition à la ligne 155 du fichier ExManagerConsole.h.

Références m_ConsoleState.

00155 { return m_ConsoleState; }

bool ExManager::GetStatus void   )  [inline, inherited]
 

Définition à la ligne 85 du fichier ExManager.h.

Références ExManager::m_Status.

Référencé par ExManagerInterface::Draw(), Draw(), et ExManagerOutput::DrawScene().

00085 {return m_Status;}

void ExManagerConsole::Init void   )  [virtual]
 

Redéfinie à partir de ExManager.

Définition à la ligne 103 du fichier ExManagerConsole.cpp.

Références Guard, SetConsoleBackGroudTexture(), et UnGuard.

Référencé par PostInitManager(), et PreInitManager().

00104 {
00105 Guard(void ExManagerConsole::init(void))
00106         SetConsoleBackGroudTexture("back");
00107 UnGuard
00108 }

ExCAction ExManagerConsole::InputAction ExCAction  Action  )  [virtual]
 

Redéfinie à partir de ExManager.

Définition à la ligne 772 du fichier ExManagerConsole.cpp.

Références ExManager::Consol, CONSOL_LINE_DOWN, CONSOL_LINE_UP, CONSOL_NEXT_AVIABLE_STATE, ConsoleMove(), DISABLE_CONSOL_BACKGROUND_BLENDING, DISABLE_CONSOL_BACKGROUND_TEXTURE, ENABLE_CONSOL_BACKGROUND_BLENDING, ENABLE_CONSOL_BACKGROUND_TEXTURE, FULL, FULLTOHALF, FULLTOHIDE, Guard, HALF, HALFTOFULL, HALFTOHIDE, HIDE, HIDE_CONSOL, HIDETOFULL, HIDETOHALF, InputAction(), isConsoleMove(), LineDown(), LineUp(), ExCAction::m_Action, ExCAction::m_NextAction, ExCAction::m_Param, NextAviableState(), NOTHING, SET_CONSOL_BACKGROUND_BLENDING, SET_CONSOL_BACKGROUND_COLOR, SET_CONSOL_BACKGROUND_COLOR_BLUE, SET_CONSOL_BACKGROUND_COLOR_GREEN, SET_CONSOL_BACKGROUND_COLOR_RED, SET_CONSOL_BACKGROUND_TEXURE, ExManager::SetAskForCommand(), ExManager::SetAskForExclusifCommand(), SetConsoleBackGroudBlending(), SetConsoleBackGroudBlendingState(), SetConsoleBackGroudColorBlue(), SetConsoleBackGroudColorGreen(), SetConsoleBackGroudColorRed(), SetConsoleBackGroudTexture(), SetConsoleBackGroudTextureState(), SetConsoleState(), ExManager::SetStatus(), SHOW_FULL_CONSOL, SHOW_HALF_CONSOL, et UnGuard.

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

00773 {
00774 Guard(ExCAction ExManagerConsole::InputAction(ExCAction Action))
00775         //std::cout<<"ManagerConsol::Input action :"<<Action<<std::endl;
00776         switch(Action.m_Action)
00777         {
00778         case CONSOL_LINE_UP:LineUp();break;
00779         case CONSOL_LINE_DOWN:LineDown();break;
00780     case SHOW_HALF_CONSOL:                                              
00781                 if (!isConsoleMove ()) 
00782                 {
00783                         ConsoleMove (true);
00784                         SetStatus(true);
00785                         SetAskForCommand(true);
00786                         SetAskForExclusifCommand(true);
00787                         SetConsoleState(HALF);
00788                 }
00789                 break;
00790         case SHOW_FULL_CONSOL:
00791                 if (!isConsoleMove ()) 
00792                 {
00793                         ConsoleMove (true);
00794                         SetStatus(true);
00795                         SetAskForCommand(true);
00796                         SetAskForExclusifCommand(true);
00797                         SetConsoleState(FULL);
00798                 }
00799                 break;
00800         case HIDE_CONSOL:       
00801                 if (!isConsoleMove ()) 
00802                 {
00803                         ConsoleMove (true);
00804                         SetStatus(false);
00805                         SetConsoleState(HIDE);
00806                         SetAskForCommand(false);
00807                         SetAskForExclusifCommand(false);
00808                 }
00809                 break;
00810         case CONSOL_NEXT_AVIABLE_STATE:
00811                 switch(NextAviableState())
00812                 {
00813                 case HIDE:
00814                 case FULLTOHIDE:
00815                 case HALFTOHIDE:
00816                         if (!isConsoleMove ()) 
00817                         {
00818                                 ConsoleMove (true);
00819                                 SetStatus(false);
00820                                 SetConsoleState(HIDE);
00821                                 SetAskForCommand(false);
00822                                 SetAskForExclusifCommand(false);
00823                         }
00824                         break;
00825                 case HALF:
00826                 case HIDETOHALF:
00827                 case FULLTOHALF:
00828                         if (!isConsoleMove ()) 
00829                         {
00830                                 ConsoleMove (true);
00831                                 SetStatus(true);
00832                                 SetAskForCommand(true);
00833                                 SetAskForExclusifCommand(true);
00834                                 SetConsoleState(HALF);
00835                         }
00836                         break;
00837                 case FULL:
00838                 case HIDETOFULL:
00839                 case HALFTOFULL:
00840                         if (!isConsoleMove ()) 
00841                         {
00842                                 ConsoleMove (true);
00843                                 SetStatus(true);
00844                                 SetAskForCommand(true);
00845                                 SetAskForExclusifCommand(true);
00846                                 SetConsoleState(FULL);
00847                         }
00848                         break;
00849                 }
00850                 break;
00851 
00852         case SET_CONSOL_BACKGROUND_TEXURE:SetConsoleBackGroudTexture(Action.m_Param);break;
00853         case ENABLE_CONSOL_BACKGROUND_TEXTURE:SetConsoleBackGroudTextureState(true);break;
00854         case DISABLE_CONSOL_BACKGROUND_TEXTURE:SetConsoleBackGroudTextureState(false);break;
00855         case SET_CONSOL_BACKGROUND_COLOR:break;
00856         case SET_CONSOL_BACKGROUND_COLOR_BLUE:
00857                 try
00858                 {
00859                         SetConsoleBackGroudColorBlue(atof(Action.m_Param.data()));
00860                 }catch(...)
00861                 {
00862                         *Consol<<"Enter a float value"<<std::endl;
00863                 }
00864                 break;
00865         case SET_CONSOL_BACKGROUND_COLOR_GREEN:
00866                 try
00867                 {
00868                         SetConsoleBackGroudColorGreen(atof(Action.m_Param.data()));
00869                 }catch(...)
00870                 {
00871                         *Consol<<"Enter a float value"<<std::endl;
00872                 }
00873                 break;
00874         case SET_CONSOL_BACKGROUND_COLOR_RED:
00875                 try
00876                 {
00877                         SetConsoleBackGroudColorRed(atof(Action.m_Param.data()));
00878                 }catch(...)
00879                 {
00880                         *Consol<<"Enter a float value"<<std::endl;
00881                 }
00882         case ENABLE_CONSOL_BACKGROUND_BLENDING:SetConsoleBackGroudBlendingState(true);break;
00883         case DISABLE_CONSOL_BACKGROUND_BLENDING:SetConsoleBackGroudBlendingState(false);break;
00884         case SET_CONSOL_BACKGROUND_BLENDING:
00885                 try
00886                 {
00887                         SetConsoleBackGroudBlending(atof(Action.m_Param.data()));
00888                 }catch(...)
00889                 {
00890                         *Consol<<"Enter a float value"<<std::endl;
00891                 }
00892                 break;
00893         }       
00894     if(Action.m_NextAction){return *Action.m_NextAction;}
00895         else{return NOTHING;}
00896 UnGuard
00897 }

ExCAction ExManagerConsole::InputCommand ExCCommand  Command  )  [virtual]
 

Redéfinie à partir de ExManager.

Définition à la ligne 452 du fichier ExManagerConsole.cpp.

Références ExNihilo::AddKeyToBuffer(), ApplyBuffCommand(), CONSOL_NEXT_AVIABLE_STATE, Guard, HIDE_CONSOL, InputAction(), InputCommand(), KEYBOARD_DOWN_ENTER, KEYBOARD_DOWN_ESC, KEYBOARD_DOWN_EXP, KEYBOARD_DOWN_PAGE_DOWN, KEYBOARD_DOWN_PAGE_UP, KEYBOARD_DOWN_SPACE, KEYBOARD_DOWN_TAB, KEYBOARD_UP_ARROW_DOWN, KEYBOARD_UP_ARROW_LEFT, KEYBOARD_UP_ARROW_UP, KEYBOARD_UP_BACKSPACE, KEYBOARD_UP_PAGE_DOWN, KEYBOARD_UP_PAGE_UP, m_BuffCommand, m_BuffOldCommand, ExCCommand::m_Command, m_ItVecStringAction, m_Move, m_VecStringAction, NOTHING, PosIntoBuffOldCommand, et UnGuard.

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

00453 {
00454 Guard(ExCAction ExManagerConsole::InputCommand(ExCCommand Command))
00455         //std::cout<<"ManagerConsol::Input Command consol:"<<Command.m_Command<<std::endl;
00456         switch(Command.m_Command)
00457         {
00458         case KEYBOARD_DOWN_EXP:
00459                 InputAction(CONSOL_NEXT_AVIABLE_STATE);
00460                 return NOTHING; 
00461         
00462         case KEYBOARD_DOWN_ESC: 
00463                 InputAction(HIDE_CONSOL);
00464                 return NOTHING; 
00465 
00466         case KEYBOARD_DOWN_PAGE_UP:
00467                 m_Move=-1;
00468                 return NOTHING;
00469         
00470         case KEYBOARD_DOWN_PAGE_DOWN:
00471                 m_Move=1;
00472                 return NOTHING;
00473 
00474         case KEYBOARD_UP_PAGE_UP:
00475                 m_Move=0;
00476                 return NOTHING;
00477         
00478         case KEYBOARD_UP_PAGE_DOWN:
00479                 m_Move=0;
00480                 return NOTHING;
00481 
00482         case KEYBOARD_DOWN_SPACE:
00483                 m_BuffCommand.append(" ");
00484                 return NOTHING;
00485 
00486         case KEYBOARD_DOWN_ENTER:
00487                 return ApplyBuffCommand();
00488         
00489         case KEYBOARD_DOWN_TAB: {
00490                 std::vector<std::string> vec_tmp;
00491                 std::vector<std::string>::iterator i_tmp;
00492                 
00493                 vec_tmp.push_back ("load");
00494                 vec_tmp.push_back ("cmd");
00495                 vec_tmp.push_back ("help");
00496                 vec_tmp.push_back ("clear");
00497                 vec_tmp.push_back ("quit");
00498                 
00499                 for (m_ItVecStringAction = m_VecStringAction.begin(); m_ItVecStringAction != m_VecStringAction.end(); m_ItVecStringAction++) {
00500                         vec_tmp.push_back (m_ItVecStringAction->first);
00501                 }
00502                 
00503                 i_tmp = vec_tmp.begin ();
00504                 std::string tmp;
00505                 
00506                 while (i_tmp != vec_tmp.end ()) {
00507                         tmp = *i_tmp++;
00508                 
00509                         if (tmp.find (m_BuffCommand) == 0) {
00510                                 if (tmp.find (' ') < tmp.length ())
00511                                         m_BuffCommand = tmp.substr (0, tmp.find (' '));
00512                                 else m_BuffCommand = tmp;
00513                                 //m_BuffCommand += ' '; // this add a space after command
00514                                 // but it sucks with some commands like quit :/
00515                         }
00516                 }
00517                 return NOTHING;
00518         }
00519 
00520         case KEYBOARD_UP_ARROW_DOWN:
00521                 PosIntoBuffOldCommand++;
00522                 if(PosIntoBuffOldCommand<(int)m_BuffOldCommand.size()&&PosIntoBuffOldCommand>=-1)
00523                 {
00524                         m_BuffCommand=m_BuffOldCommand.at(PosIntoBuffOldCommand);                       
00525                 }else
00526                 {
00527                         PosIntoBuffOldCommand=0;
00528                 }
00529 
00530 
00531                 return NOTHING;
00532         
00533         case KEYBOARD_UP_ARROW_UP:
00534                 PosIntoBuffOldCommand--;
00535                 if(PosIntoBuffOldCommand<(int)m_BuffOldCommand.size()&&PosIntoBuffOldCommand>=0)
00536                 {
00537                         m_BuffCommand=m_BuffOldCommand.at(PosIntoBuffOldCommand);                       
00538                 }else
00539                 {
00540                         PosIntoBuffOldCommand=0;
00541                 }
00542                 return NOTHING;
00543         
00544         case KEYBOARD_UP_ARROW_LEFT:
00545                 if(m_BuffCommand.size()>0)
00546                 {
00547                         m_BuffCommand.erase(m_BuffCommand.end()-1,m_BuffCommand.end());
00548                 }
00549                 return NOTHING;
00550         
00551         case KEYBOARD_UP_BACKSPACE:
00552                 if(m_BuffCommand.size()>0)
00553                 {
00554                         m_BuffCommand.erase(m_BuffCommand.end()-1,m_BuffCommand.end());
00555                 }
00556                 return NOTHING;
00557         }
00558         ExNihilo::AddKeyToBuffer(Command.m_Command,m_BuffCommand);
00559         return NOTHING;
00560 UnGuard
00561 }

bool ExManagerConsole::isConsoleMove void   )  [inline]
 

Définition à la ligne 157 du fichier ExManagerConsole.h.

Références console_move.

Référencé par InputAction().

00157 { return console_move; }

void ExManagerConsole::LineDown void   ) 
 

Définition à la ligne 368 du fichier ExManagerConsole.cpp.

Références m_LineToStar.

Référencé par Draw(), et InputAction().

00369 {
00370         m_LineToStar--;
00371         if(m_LineToStar<0){m_LineToStar=0;}
00372 }

void ExManagerConsole::LineUp void   ) 
 

Définition à la ligne 363 du fichier ExManagerConsole.cpp.

Références m_LineInConsol, et m_LineToStar.

Référencé par Draw(), et InputAction().

void ExManagerConsole::ListConsoleCommand void   ) 
 

Définition à la ligne 563 du fichier ExManagerConsole.cpp.

Références ExManager::Consol, Guard, ListConsoleCommand(), m_ItVecStringAction, m_VecStringAction, PREDIFINEDCOMMAND, et UnGuard.

Référencé par ApplyBuffCommand(), et ListConsoleCommand().

00564 {
00565 Guard(void ExManagerConsole::ListConsoleCommand(void))
00566         *Consol<<"*******************************"<<std::endl;
00567         *Consol<<"*List of all available command*"<<std::endl;
00568         *Consol<<"*******************************"<<std::endl;
00569         *Consol<<"load 'FILENAME'"<<std::endl;
00570         *Consol<<"cmd 'number of command'"<<std::endl;;
00571         *Consol<<"help 'command'"<<std::endl;
00572         *Consol<<"clear 'clear console screen'"<<std::endl;
00573         *Consol<<"Extension ' List aviable Extension'"<<std::endl;
00574         *Consol<<"quit 'exit ExNihilo'"<<std::endl;
00575         int i=PREDIFINEDCOMMAND;
00576         for(m_ItVecStringAction=m_VecStringAction.begin(); m_ItVecStringAction != m_VecStringAction.end(); m_ItVecStringAction++, i++) 
00577         {
00578                 *Consol<<m_ItVecStringAction->first.data()<<std::endl;
00579         }
00580         *Consol<<"*****************************"<<std::endl;
00581 UnGuard
00582 }

void ExManagerConsole::LoadStringActionFile const char *  FileName  ) 
 

Définition à la ligne 726 du fichier ExManagerConsole.cpp.

Références AddStringAction(), ExNihilo::ExtracValueFromSring(), Guard, LoadStringActionFile(), PREFIX, StringAction, et UnGuard.

Référencé par ExManagerLoad::InputAction(), ExManagerLoad::LoadSetOfFile(), et LoadStringActionFile().

00727 {
00728 Guard(void ExManagerConsole::LoadStringActionFile(const char *FileName))
00729     char                        buffer[255];
00730         
00731 #ifdef UNIX_SRC
00732         sprintf(buffer, PREFIX "/ExNihilo/Data/Console/%s", FileName);
00733 #else
00734         sprintf(buffer, "../Data/Console/%s", FileName);
00735 #endif
00736         StringAction BuffStringAction;
00737         std::ifstream fin;
00738         std::string buffstring;
00739         char b[256];
00740         fin.open(buffer,std::ios::in);
00741         if(fin.is_open())
00742         {
00743                 try
00744                 {
00745                         do
00746                         {
00747                                 memset(b,0,255);
00748                                 fin.getline(b,256,'\n');
00749                                 try
00750                                 {
00751                                         buffstring=ExNihilo::ExtracValueFromSring(b,"<consolcommand>","<#consolcommand>");
00752                                         AddStringAction(ExNihilo::ExtracValueFromSring(buffstring,"<string>","<#string>")
00753                                                 ,ExNihilo::ExtractIntValueFromSring(buffstring,"<action>","<#action>"));
00754                                 }catch(ExCExpStringNotFound){}
00755                         }while(!fin.eof());
00756                         fin.close();
00757                 }catch(...){throw ExCExpFileReadError();}
00758         }else throw   ExCExpFileNotFound();
00759 UnGuard
00760 }

int ExManagerConsole::NextAviableState void   ) 
 

Définition à la ligne 426 du fichier ExManagerConsole.cpp.

Références FULL, FULLTOHALF, FULLTOHIDE, Guard, HALF, HALFTOFULL, HALFTOHIDE, HIDE, HIDETOFULL, HIDETOHALF, m_ConsoleState, NextAviableState(), et UnGuard.

Référencé par InputAction(), et NextAviableState().

00426                                            {
00427 Guard(int ExManagerConsole::NextAviableState(void))
00428         switch(m_ConsoleState) {
00429                 case HIDE: return HALF;
00430                 case HALF: return FULL;
00431                 case FULL: return HIDE;
00432                 case HIDETOHALF : return HALF;
00433                 case HIDETOFULL : return FULL;
00434                 case HALFTOFULL : return FULL;
00435                 case FULLTOHALF : return HALF;
00436                 case FULLTOHIDE : return HIDE;
00437                 case HALFTOHIDE : return HIDE;
00438                 default: return HALF;
00439         }
00440 UnGuard
00441 }

void ExManager::Reload void   )  [virtual, inherited]
 

Redéfinie dans ExManagerCollision, ExManagerAnimation, ExManagerEntity, ExManagerModel, ExManagerObject< TypeA >, ExManagerTexture, ExManagerObject< ExCAnimation >, ExManagerObject< ExCModel * >, ExManagerObject< ExCWindow >, ExManagerObject< ExCVertexProgram >, ExManagerObject< ExCLight >, ExManagerObject< ExCLoadingAnimation >, ExManagerObject< ExCInterface >, ExManagerObject< ExCSound >, ExManagerObject< ExCCamera * >, ExManagerObject< ExCFont >, ExManagerObject< ExCGizmo >, ExManagerObject< ExCMesh * >, ExManagerObject< ExCTexture >, ExManagerObject< ExCEntity * >, ExManagerObject< ExCSystemeParticule >, et ExManagerObject< ExCSpirit >.

Définition à la ligne 33 du fichier ExManager.cpp.

Référencé par ExManagerCommand::ProcesExCAction().

00034 {}

void ExManagerConsole::Reset void   )  [virtual]
 

Redéfinie à partir de ExManager.

Définition à la ligne 83 du fichier ExManagerConsole.cpp.

Références console_move, Guard, HIDE, m_ConsoleState, m_ConsoleTransPalier, m_LineCounter, m_VecStringAction, PosIntoBuffOldCommand, Reset(), et UnGuard.

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

00084 {
00085 Guard(ExManagerConsole::Reset(void))
00086         m_ConsoleState=HIDE;
00087         m_LineCounter=2;
00088         PosIntoBuffOldCommand=0;
00089         m_ConsoleTransPalier=20;
00090         //m_BufferConsol.clear();
00091         m_VecStringAction.clear();
00092 //      SetConsoleBackGroudTexture("back2.tga");
00093         console_move = false;
00094 UnGuard
00095 }

void ExManager::SetAskForCommand bool  status  )  [inline, inherited]
 

Définition à la ligne 87 du fichier ExManager.h.

Références ExManager::m_AskForCommand.

Référencé par ExManagerConsole(), ExManagerModel::ExManagerModel(), ExManagerObjectWindow::Init(), ExManagerNetwork::Init(), InputAction(), ExManagerNetwork::InputCommand(), ExManagerLoad::LoadSetOfFile(), et ExManagerNetwork::Say().

00087 {m_AskForCommand=status;} 

void ExManager::SetAskForExclusifCommand bool  status  )  [inline, inherited]
 

Définition à la ligne 88 du fichier ExManager.h.

Références ExManager::m_Exclusif.

Référencé par ExManagerConsole(), ExManagerModel::ExManagerModel(), ExManagerObjectWindow::Init(), ExManagerNetwork::Init(), InputAction(), ExManagerNetwork::InputCommand(), et ExManagerNetwork::Say().

00088 {m_Exclusif=status;}

void ExManagerConsole::SetConsoleBackGroudBlending float  blending  )  [inline]
 

Définition à la ligne 161 du fichier ExManagerConsole.h.

Références m_fBlending.

Référencé par InputAction().

00161 {m_fBlending=blending;}

void ExManagerConsole::SetConsoleBackGroudBlendingState bool  state  )  [inline]
 

Définition à la ligne 160 du fichier ExManagerConsole.h.

Références m_Blending.

Référencé par InputAction().

00160 {m_Blending=state;}

void ExManagerConsole::SetConsoleBackGroudColor float  R,
float  G,
float  B
[inline]
 

Définition à la ligne 165 du fichier ExManagerConsole.h.

Références B, m_fBackGroundBlue, m_fBackGroundGreen, et m_fBackGroundRed.

void ExManagerConsole::SetConsoleBackGroudColorBlue float  value  )  [inline]
 

Définition à la ligne 164 du fichier ExManagerConsole.h.

Références m_fBackGroundBlue.

Référencé par InputAction().

00164 {m_fBackGroundBlue=value;}

void ExManagerConsole::SetConsoleBackGroudColorGreen float  value  )  [inline]
 

Définition à la ligne 163 du fichier ExManagerConsole.h.

Références m_fBackGroundGreen.

Référencé par InputAction().

00163 {m_fBackGroundGreen=value;}

void ExManagerConsole::SetConsoleBackGroudColorRed float  value  )  [inline]
 

Définition à la ligne 162 du fichier ExManagerConsole.h.

Références m_fBackGroundRed.

Référencé par InputAction().

00162 {m_fBackGroundRed=value;}

void ExManagerConsole::SetConsoleBackGroudTexture std::string  FileName  ) 
 

Définition à la ligne 111 du fichier ExManagerConsole.cpp.

Références ExManagerTexture::Add(), Guard, m_BackGroundTexture, ManagerTexture, SetConsoleBackGroudTexture(), et UnGuard.

Référencé par Init(), InputAction(), et SetConsoleBackGroudTexture().

00112 {
00113 Guard(void ExManagerConsole::SetConsoleBackGroudTexture(std::string     FileName))
00114         if(ManagerTexture->Add(FileName))
00115         {
00116                 m_BackGroundTexture=FileName;   
00117         }
00118 
00119 UnGuard
00120 }

void ExManagerConsole::SetConsoleBackGroudTextureState bool  state  )  [inline]
 

Définition à la ligne 159 du fichier ExManagerConsole.h.

Références m_BackGroundTextureState.

Référencé par InputAction().

00159 {m_BackGroundTextureState=state;}

void ExManagerConsole::SetConsoleState int  state  ) 
 

Définition à la ligne 378 du fichier ExManagerConsole.cpp.

Références FULL, FULLTOHALF, FULLTOHIDE, Guard, HALF, HALFTOFULL, HALFTOHIDE, HIDE, HIDETOFULL, HIDETOHALF, m_ConsoleState, m_ConsoleTrans, m_NextConsoleState, SetConsoleState(), ExManager::SetStatus(), et UnGuard.

Référencé par InputAction(), et SetConsoleState().

00379 {
00380 Guard(void ExManagerConsole::SetConsoleState(int state))
00381         //cout<<"set console state :"<<state<<endl;
00382         SetStatus(true);
00383         switch(m_ConsoleState)
00384         {
00385         case HIDE:
00386                 m_NextConsoleState=state;
00387                 switch(state)
00388                 {
00389                 case HALF:
00390                         m_ConsoleState=HIDETOHALF;
00391                         break;
00392                 case FULL:
00393                         m_ConsoleState=HIDETOFULL;
00394                         break;
00395                 }
00396                 break;
00397         case HALF:
00398                 m_NextConsoleState=state;
00399                 switch(state)
00400                 {
00401                 case FULL:
00402                         m_ConsoleState=HALFTOFULL;
00403                         break;
00404                 case HIDE:
00405                         m_ConsoleState=HALFTOHIDE;
00406                         break;
00407                 }
00408                 break;
00409         case FULL:
00410                 m_NextConsoleState=state;
00411                 switch(state)
00412                 {
00413                 case HALF:
00414                         m_ConsoleState=FULLTOHALF;
00415                         break;
00416                 case HIDE:
00417                         m_ConsoleState=FULLTOHIDE;
00418                         break;
00419                 }
00420                 break;
00421         }
00422         m_ConsoleTrans=1;
00423 UnGuard
00424 }

void ExManager::SetFlux std::ostrstream *  consol,
ExCFluxAction action
[inherited]
 

Définition à la ligne 35 du fichier ExManager.cpp.

Références ExManager::Consol, et ExManager::FluxAction.

Référencé par SetManagerLink().

00036 {
00037         Consol=consol;
00038         FluxAction=action;
00039 }

void ExManagerConsole::SetManagerTexture ExManagerTexture Texture  )  [inline]
 

Définition à la ligne 145 du fichier ExManagerConsole.h.

Références ManagerTexture.

Référencé par SetManagerLink().

00145 {ManagerTexture = Texture;}

void ExManagerConsole::SetManagerWindow ExManagerWindow Window  )  [inline]
 

Définition à la ligne 144 du fichier ExManagerConsole.h.

Références ManagerWindow.

Référencé par SetManagerLink().

00144 {ManagerWindow = Window;}

void ExManager::SetStatus bool  status  )  [inline, inherited]
 

Définition à la ligne 86 du fichier ExManager.h.

Références ExManager::m_Status.

Référencé par Draw(), ExManagerConsole(), ExManagerObjectWindow::Init(), ExManagerInterface::Init(), InputAction(), ExManagerLoad::LoadSetOfFile(), et SetConsoleState().

00086 {m_Status=status;}

void ExManagerConsole::UpdateConsolBuffer void   )  [private]
 

Définition à la ligne 314 du fichier ExManagerConsole.cpp.

Références ExManager::Consol, ExManagerWindow::GetResolutionX(), Guard, LogConsol, logfilecsl, m_BufferConsol, m_ItBufferConsol, m_LineInConsol, ManagerWindow, UnGuard, et UpdateConsolBuffer().

Référencé par Draw(), et UpdateConsolBuffer().

00315 {
00316 Guard(void ExManagerConsole::UpdateConsolBuffer(void))
00317         std::string             bufferstring,bufferstring2;
00318         bufferstring=Consol->rdbuf( )->str();
00319         Consol->freeze(false);
00320         Consol->clear();
00321         Consol->flush();
00322         //m_BufferConsol.push_back(bufferstring);
00323         
00324         
00325         m_LineInConsol=0;
00326         do
00327         {
00328                 bufferstring2 = bufferstring.substr(0,bufferstring.find ( "\n" ,0));
00329                 bufferstring.erase(0,bufferstring.find ( "\n" ,0)+1);
00330                 do
00331                 {
00332                         if(bufferstring2.size()>(unsigned)(ManagerWindow->GetResolutionX()/8)-1)
00333                         {
00334                                 m_BufferConsol.push_back(bufferstring2.substr(0,((int)(ManagerWindow->GetResolutionX()/8))-1));
00335                                 bufferstring2=bufferstring2.substr(((int)(ManagerWindow->GetResolutionX()/8))-1,bufferstring2.size());
00336                                 m_LineInConsol++;
00337             }else
00338                         {
00339                                 m_BufferConsol.push_back(bufferstring2);
00340                                 m_LineInConsol++;
00341                                 break;
00342                         }
00343                 }while(1);
00344         }while((unsigned)-1 != bufferstring.find( "\n" ,0));
00345 
00346         //-------------------
00347         //Save Consol Flux
00348         //-------------------
00349                 
00350         if(LogConsol=true)
00351         {
00352                 logfilecsl.open("logConsol.txt",std::ios::out);
00353                 int i=0;
00354                 for(m_ItBufferConsol=m_BufferConsol.begin();m_ItBufferConsol!=m_BufferConsol.end();m_ItBufferConsol++,i++)
00355                 {
00356                         logfilecsl<<i<<"::"<<m_ItBufferConsol->data()<<std::endl;                                       
00357                 }
00358                 //logfilecsl.close();
00359         }
00360 UnGuard
00361 }

void ExManagerConsole::Write const char *   ) 
 

Définition à la ligne 443 du fichier ExManagerConsole.cpp.

Références ExManager::Consol, Guard, UnGuard, et Write().

Référencé par Write().

00444 {
00445 Guard(void ExManagerConsole::Write(const char *Label))
00446         //*Consol<<"<<==================Write to consol===========================>>"<<std::endl;
00447         *Consol << Label << std::endl;
00448         //*Consol<<"<<============================================================>>"<<std::endl;
00449 UnGuard
00450 }

void ExManagerConsole::WriteInDaFile std::string  str  )  [private]
 


Documentation des données imbriquées

std::ostrstream* ExManager::Consol [inherited]
 

Définition à la ligne 73 du fichier ExManager.h.

Référencé par ExManagerObject< TypeA >::Add(), AddStringAction(), ApplyBuffCommand(), ExManagerInputGLUT::CheckInput(), ExManagerSound::DisplayAviableInput(), ExManagerInputGLUT::DisplayAviableInput(), ExManagerLoad::DisplayFileType(), ExManagerLoad::GetFileType(), ExManagerVertexArrays::Init(), ExManagerTexture::Init(), ExManagerSound::Init(), ExManagerFog::Init(), ExManagerSound::InputAction(), ExManagerPVS::InputAction(), ExManagerParticuleSystem::InputAction(), ExManagerModel::InputAction(), ExManagerMesh::InputAction(), ExManagerMap::InputAction(), ExManagerLoad::InputAction(), ExManagerInterface::InputAction(), ExManagerFog::InputAction(), ExManagerEntity::InputAction(), InputAction(), ExManagerCommand::InputAction(), ExManagerCamera::InputAction(), ExManagerAnimation::InputAction(), ExManagerObject< TypeA >::List(), ExManagerModel::List(), ExManagerId::List(), ListConsoleCommand(), ExManagerTexture::Load(), ExManagerParticuleSystem::Load(), ExManagerModel::Load(), ExManagerInterface::Load(), ExManagerTexture::LoadCubeMap(), ExManagerLoad::LoadSetOfFile(), ExManagerSound::LoadSound(), ExManagerSound::PauseSound(), ExManagerSound::PlaySound(), ExManagerCommand::ProcesExCAction(), ExManagerId::RecordObject(), ExManager::SetFlux(), ExManagerSound::SetRepeatSound(), ExManagerSound::StopSound(), UpdateConsolBuffer(), et Write().

bool ExManagerConsole::console_move [private]
 

Définition à la ligne 96 du fichier ExManagerConsole.h.

Référencé par ConsoleMove(), Draw(), ExManagerConsole(), isConsoleMove(), et Reset().

ExCFluxAction* ExManager::FluxAction [inherited]
 

Définition à la ligne 74 du fichier ExManager.h.

Référencé par ExManagerWindow::Apply(), ExManagerCommand::ApplyAction(), ExManagerCommand::LoadExecFile(), ExManagerId::RecordObject(), ExManager::SetFlux(), et ExManagerSpecialEffect::Specialeffect().

bool ExManagerConsole::LogConsol [private]
 

Définition à la ligne 98 du fichier ExManagerConsole.h.

Référencé par ExManagerConsole(), et UpdateConsolBuffer().

std::ofstream ExManagerConsole::logfilecsl [private]
 

Définition à la ligne 107 du fichier ExManagerConsole.h.

Référencé par ExManagerConsole(), et UpdateConsolBuffer().

bool ExManager::m_AskForCommand [protected, inherited]
 

Définition à la ligne 70 du fichier ExManager.h.

Référencé par ExManager::AskForCommand(), ExManagerConsole(), et ExManager::SetAskForCommand().

std::string ExManagerConsole::m_BackGroundTexture [private]
 

Définition à la ligne 110 du fichier ExManagerConsole.h.

Référencé par Draw(), et SetConsoleBackGroudTexture().

bool ExManagerConsole::m_BackGroundTextureState [private]
 

Définition à la ligne 99 du fichier ExManagerConsole.h.

Référencé par Draw(), ExManagerConsole(), et SetConsoleBackGroudTextureState().

bool ExManagerConsole::m_Blending [private]
 

Définition à la ligne 100 du fichier ExManagerConsole.h.

Référencé par Draw(), ExManagerConsole(), et SetConsoleBackGroudBlendingState().

std::string ExManagerConsole::m_BuffCommand [private]
 

Définition à la ligne 111 du fichier ExManagerConsole.h.

Référencé par ApplyBuffCommand(), ClearConsol(), Draw(), et InputCommand().

std::vector<std::string> ExManagerConsole::m_BufferConsol [private]
 

Définition à la ligne 118 du fichier ExManagerConsole.h.

Référencé par ApplyBuffCommand(), ClearConsol(), Draw(), et UpdateConsolBuffer().

std::vector<std::string> ExManagerConsole::m_BuffOldCommand [private]
 

Définition à la ligne 112 du fichier ExManagerConsole.h.

Référencé par ApplyBuffCommand(), ClearConsol(), et InputCommand().

int ExManagerConsole::m_ConsoleState [private]
 

Définition à la ligne 91 du fichier ExManagerConsole.h.

Référencé par Draw(), ExManagerConsole(), GetConsoleState(), NextAviableState(), Reset(), et SetConsoleState().

int ExManagerConsole::m_ConsoleTrans [private]
 

Définition à la ligne 93 du fichier ExManagerConsole.h.

Référencé par Draw(), et SetConsoleState().

int ExManagerConsole::m_ConsoleTransPalier [private]
 

Définition à la ligne 95 du fichier ExManagerConsole.h.

Référencé par Draw(), ExManagerConsole(), et Reset().

bool ExManager::m_Exclusif [protected, inherited]
 

Définition à la ligne 71 du fichier ExManager.h.

Référencé par ExManager::AskForExclusifCommand(), et ExManager::SetAskForExclusifCommand().

float ExManagerConsole::m_fBackGroundBlue [private]
 

Définition à la ligne 102 du fichier ExManagerConsole.h.

Référencé par Draw(), ExManagerConsole(), SetConsoleBackGroudColor(), et SetConsoleBackGroudColorBlue().

float ExManagerConsole::m_fBackGroundGreen [private]
 

Définition à la ligne 104 du fichier ExManagerConsole.h.

Référencé par Draw(), ExManagerConsole(), SetConsoleBackGroudColor(), et SetConsoleBackGroudColorGreen().

float ExManagerConsole::m_fBackGroundRed [private]
 

Définition à la ligne 103 du fichier ExManagerConsole.h.

Référencé par Draw(), ExManagerConsole(), SetConsoleBackGroudColor(), et SetConsoleBackGroudColorRed().

float ExManagerConsole::m_fBlending [private]
 

Définition à la ligne 101 du fichier ExManagerConsole.h.

Référencé par Draw(), ExManagerConsole(), et SetConsoleBackGroudBlending().

bool ExManagerConsole::m_flag = false [static, private]
 

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

Référencé par CreateSingleton().

ExManagerConsole * ExManagerConsole::m_instance = NULL [static, private]
 

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

Référencé par CreateSingleton().

std::vector<std::string>::iterator ExManagerConsole::m_ItBufferConsol [private]
 

Définition à la ligne 120 du fichier ExManagerConsole.h.

Référencé par UpdateConsolBuffer().

std::vector<StringAction>::iterator ExManagerConsole::m_ItVecStringAction [private]
 

Définition à la ligne 116 du fichier ExManagerConsole.h.

Référencé par ApplyBuffCommand(), InputCommand(), et ListConsoleCommand().

int ExManagerConsole::m_LineCounter [private]
 

Définition à la ligne 92 du fichier ExManagerConsole.h.

Référencé par ExManagerConsole(), et Reset().

int ExManagerConsole::m_LineInConsol [private]
 

Définition à la ligne 106 du fichier ExManagerConsole.h.

Référencé par LineUp(), et UpdateConsolBuffer().

int ExManagerConsole::m_LineToStar [private]
 

Définition à la ligne 105 du fichier ExManagerConsole.h.

Référencé par Draw(), LineDown(), et LineUp().

int ExManagerConsole::m_Move [private]
 

Définition à la ligne 97 du fichier ExManagerConsole.h.

Référencé par Draw(), ExManagerConsole(), et InputCommand().

int ExManagerConsole::m_NextConsoleState [private]
 

Définition à la ligne 94 du fichier ExManagerConsole.h.

Référencé par Draw(), et SetConsoleState().

std::vector<std::string>::reverse_iterator ExManagerConsole::m_RItBufferConsol [private]
 

Définition à la ligne 119 du fichier ExManagerConsole.h.

Référencé par Draw().

bool ExManager::m_Status [protected, inherited]
 

Définition à la ligne 69 du fichier ExManager.h.

Référencé par ExManager::GetStatus(), et ExManager::SetStatus().

std::vector<StringAction> ExManagerConsole::m_VecStringAction [private]
 

Définition à la ligne 115 du fichier ExManagerConsole.h.

Référencé par AddStringAction(), ApplyBuffCommand(), InputCommand(), ListConsoleCommand(), et Reset().

ExManagerTexture* ExManagerConsole::ManagerTexture [private]
 

Définition à la ligne 90 du fichier ExManagerConsole.h.

Référencé par Draw(), SetConsoleBackGroudTexture(), et SetManagerTexture().

ExManagerWindow* ExManagerConsole::ManagerWindow [private]
 

Définition à la ligne 89 du fichier ExManagerConsole.h.

Référencé par Draw(), SetManagerWindow(), et UpdateConsolBuffer().

int ExManagerConsole::PosIntoBuffOldCommand [private]
 

Définition à la ligne 108 du fichier ExManagerConsole.h.

Référencé par ExManagerConsole(), InputCommand(), et Reset().

float ExManagerConsole::TabTextures[8] [private]
 

Définition à la ligne 122 du fichier ExManagerConsole.h.

Référencé par Draw(), et ExManagerConsole().

float ExManagerConsole::TabVertices[8] [private]
 

Définition à la ligne 122 du fichier ExManagerConsole.h.

Référencé par Draw(), et ExManagerConsole().


La documentation associée à cette classe a été générée à partir des fichiers suivants :
Généré le Tue Oct 28 12:44:02 2003 pour ExNihilo par doxygen 1.3.4