utils.h File Reference

#include <wx/wx.h>
#include <Ogre.h>

Go to the source code of this file.

Defines

#define IMPLEMENT_OGRE_SINGLETON(CLASS)
#define DECLARE_OGRE_SINGLETON(CLASS)
#define all2std(x)   Ogre::StringConverter::toString((x))

Functions

void wxOgreExceptionBox (Ogre::Exception &e)
std::string wx2std (const wxString &s)
 Convert a wxWidget string to a standard C++ string.
wxString std2wx (const std::string &s)
 Convert a standard C++ string to a wxWidget string.
std::string getExtension (const std::string &s)
 Get the extension from a string.


Define Documentation

#define all2std (  )     Ogre::StringConverter::toString((x))

Definition at line 59 of file utils.h.

#define DECLARE_OGRE_SINGLETON ( CLASS   ) 

Value:

public:                                                         \
                                                                \
    static CLASS& getSingleton();                               \
                                                                \
    static CLASS* getSingletonPtr();

Definition at line 41 of file utils.h.

#define IMPLEMENT_OGRE_SINGLETON ( CLASS   ) 

Value:

\
    template<> CLASS* Ogre::Singleton<CLASS>::ms_Singleton = 0; \
                                                                \
    CLASS& CLASS::getSingleton()                                \
    {                                                           \
        assert(ms_Singleton);                                   \
        return *ms_Singleton;                                   \
    }                                                           \
                                                                \
    CLASS* CLASS::getSingletonPtr()                             \
    {                                                           \
        return ms_Singleton;                                    \
    }                                                           \

Definition at line 26 of file utils.h.


Function Documentation

std::string getExtension ( const std::string &  s  ) 

Get the extension from a string.

wxString std2wx ( const std::string &  s  ) 

Convert a standard C++ string to a wxWidget string.

std::string wx2std ( const wxString &  s  ) 

Convert a wxWidget string to a standard C++ string.

void wxOgreExceptionBox ( Ogre::Exception &  e  )