MyGUI  3.2.1
Macros
MyGUI_Diagnostic.h File Reference
#include "MyGUI_Prerequest.h"
#include "MyGUI_Exception.h"
#include "MyGUI_LogManager.h"
#include <sstream>

Go to the source code of this file.

Macros

#define MYGUI_LOG_SECTION   "Core"
 
#define MYGUI_LOG_FILENAME   "MyGUI.log"
 
#define MYGUI_LOG(level, text)   MYGUI_LOGGING(MYGUI_LOG_SECTION, level, text)
 
#define MYGUI_BASE_EXCEPT(desc, src)   throw MyGUI::Exception(desc, src, __FILE__, __LINE__);
 
#define MYGUI_DBG_BREAK
 
#define MYGUI_EXCEPT(dest)
 
#define MYGUI_ASSERT(exp, dest)
 
#define MYGUI_ASSERT_RANGE(index, size, owner)   MYGUI_ASSERT(index < size, owner << " : index number " << index << " out of range [" << size << "]");
 
#define MYGUI_ASSERT_RANGE_AND_NONE(index, size, owner)   MYGUI_ASSERT(index < size || index == MyGUI::ITEM_NONE, owner << " : index number " << index << " out of range [" << size << "]");
 
#define MYGUI_ASSERT_RANGE_INSERT(index, size, owner)   MYGUI_ASSERT((index <= size) || (index == MyGUI::ITEM_NONE), owner << " : insert index number " << index << " out of range [" << size << "] or not ITEM_NONE");
 
#define MYGUI_REGISTER_VALUE(map, value)   map[#value] = value;
 
#define MYGUI_DEBUG_ASSERT(exp, dest)   ((void)0)
 
#define MYGUI_OBSOLETE_START(text)
 
#define MYGUI_OBSOLETE_END
 
#define MYGUI_OBSOLETE(text)   /*! \deprecated text */ MYGUI_OBSOLETE_START(text)MYGUI_OBSOLETE_END
 

Macro Definition Documentation

#define MYGUI_ASSERT (   exp,
  dest 
)
Value:
{ \
if ( ! (exp) ) \
{ \
MYGUI_LOG(Critical, dest); \
MYGUI_DBG_BREAK;\
std::ostringstream stream; \
stream << dest << "\n"; \
MYGUI_BASE_EXCEPT(stream.str().c_str(), "MyGUI"); \
} \
}

Definition at line 42 of file MyGUI_Diagnostic.h.

#define MYGUI_ASSERT_RANGE (   index,
  size,
  owner 
)    MYGUI_ASSERT(index < size, owner << " : index number " << index << " out of range [" << size << "]");

Definition at line 54 of file MyGUI_Diagnostic.h.

#define MYGUI_ASSERT_RANGE_AND_NONE (   index,
  size,
  owner 
)    MYGUI_ASSERT(index < size || index == MyGUI::ITEM_NONE, owner << " : index number " << index << " out of range [" << size << "]");

Definition at line 55 of file MyGUI_Diagnostic.h.

#define MYGUI_ASSERT_RANGE_INSERT (   index,
  size,
  owner 
)    MYGUI_ASSERT((index <= size) || (index == MyGUI::ITEM_NONE), owner << " : insert index number " << index << " out of range [" << size << "] or not ITEM_NONE");

Definition at line 56 of file MyGUI_Diagnostic.h.

#define MYGUI_BASE_EXCEPT (   desc,
  src 
)    throw MyGUI::Exception(desc, src, __FILE__, __LINE__);

Definition at line 24 of file MyGUI_Diagnostic.h.

#define MYGUI_DBG_BREAK

Definition at line 30 of file MyGUI_Diagnostic.h.

#define MYGUI_DEBUG_ASSERT (   exp,
  dest 
)    ((void)0)

Definition at line 67 of file MyGUI_Diagnostic.h.

#define MYGUI_EXCEPT (   dest)
Value:
{ \
MYGUI_LOG(Critical, dest); \
MYGUI_DBG_BREAK;\
std::ostringstream stream; \
stream << dest << "\n"; \
MYGUI_BASE_EXCEPT(stream.str().c_str(), "MyGUI"); \
}

Definition at line 33 of file MyGUI_Diagnostic.h.

#define MYGUI_LOG (   level,
  text 
)    MYGUI_LOGGING(MYGUI_LOG_SECTION, level, text)

Definition at line 22 of file MyGUI_Diagnostic.h.

#define MYGUI_LOG_FILENAME   "MyGUI.log"

Definition at line 21 of file MyGUI_Diagnostic.h.

#define MYGUI_LOG_SECTION   "Core"

Definition at line 20 of file MyGUI_Diagnostic.h.

#define MYGUI_OBSOLETE (   text)    /*! \deprecated text */ MYGUI_OBSOLETE_START(text)MYGUI_OBSOLETE_END

Definition at line 95 of file MyGUI_Diagnostic.h.

#define MYGUI_OBSOLETE_END

Definition at line 91 of file MyGUI_Diagnostic.h.

#define MYGUI_OBSOLETE_START (   text)

Definition at line 90 of file MyGUI_Diagnostic.h.

#define MYGUI_REGISTER_VALUE (   map,
  value 
)    map[#value] = value;

Definition at line 66 of file MyGUI_Diagnostic.h.