MyGUI 3.4.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_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

◆ MYGUI_ASSERT

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

Definition at line 34 of file MyGUI_Diagnostic.h.

◆ MYGUI_ASSERT_RANGE

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

Definition at line 45 of file MyGUI_Diagnostic.h.

◆ MYGUI_ASSERT_RANGE_AND_NONE

#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 46 of file MyGUI_Diagnostic.h.

◆ MYGUI_ASSERT_RANGE_INSERT

#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 47 of file MyGUI_Diagnostic.h.

◆ MYGUI_BASE_EXCEPT

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

Definition at line 24 of file MyGUI_Diagnostic.h.

◆ MYGUI_DEBUG_ASSERT

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

Definition at line 58 of file MyGUI_Diagnostic.h.

◆ MYGUI_EXCEPT

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

Definition at line 26 of file MyGUI_Diagnostic.h.

◆ MYGUI_LOG

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

Definition at line 22 of file MyGUI_Diagnostic.h.

◆ MYGUI_LOG_FILENAME

#define MYGUI_LOG_FILENAME   "MyGUI.log"

Definition at line 21 of file MyGUI_Diagnostic.h.

◆ MYGUI_LOG_SECTION

#define MYGUI_LOG_SECTION   "Core"

Definition at line 20 of file MyGUI_Diagnostic.h.

◆ MYGUI_OBSOLETE

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

Definition at line 86 of file MyGUI_Diagnostic.h.

◆ MYGUI_OBSOLETE_END

#define MYGUI_OBSOLETE_END

Definition at line 82 of file MyGUI_Diagnostic.h.

◆ MYGUI_OBSOLETE_START

#define MYGUI_OBSOLETE_START (   text)

Definition at line 81 of file MyGUI_Diagnostic.h.

◆ MYGUI_REGISTER_VALUE

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

Definition at line 57 of file MyGUI_Diagnostic.h.