MyGUI: MyGUI_Diagnostic.h File Reference

MyGUI 3.4.3

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)
#define | MYGUI_BASE_EXCEPT(desc, src)
#define | MYGUI_EXCEPT(dest)
#define | MYGUI_ASSERT(exp, dest)
#define | MYGUI_ASSERT_RANGE(index, size, owner)
#define | MYGUI_ASSERT_RANGE_AND_NONE(index, size, owner)
#define | MYGUI_ASSERT_RANGE_INSERT(index, size, owner)
#define | MYGUI_REGISTER_VALUE(map, value)
#define | MYGUI_DEBUG_ASSERT(exp, dest)
#define | MYGUI_OBSOLETE(text)

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

## ◆ MYGUI_ASSERT_RANGE

#define MYGUI_ASSERT_RANGE | ( |  | index,
|  |  | size,
|  |  | owner )

Value:
MYGUI_ASSERT(index < size, owner << " : index number " << index << " out of range [" << size << "]")
MYGUI_ASSERT
#define MYGUI_ASSERT(exp, dest)
Definition MyGUI_Diagnostic.h:31

Definition at line 44 of file MyGUI_Diagnostic.h.

## ◆ MYGUI_ASSERT_RANGE_AND_NONE

#define MYGUI_ASSERT_RANGE_AND_NONE | ( |  | index,
|  |  | size,
|  |  | owner )

Value:
MYGUI_ASSERT( \
index < size || index == MyGUI::ITEM_NONE, \
owner << " : index number " << index << " out of range [" << size << "]")
MyGUI::ITEM_NONE
constexpr size_t ITEM_NONE
Definition MyGUI_Macros.h:19

Definition at line 46 of file MyGUI_Diagnostic.h.

## ◆ MYGUI_ASSERT_RANGE_INSERT

#define MYGUI_ASSERT_RANGE_INSERT | ( |  | index,
|  |  | size,
|  |  | owner )

Value:
MYGUI_ASSERT( \
(index <= size) || (index == MyGUI::ITEM_NONE), \
owner << " : insert index number " << index << " out of range [" << size << "] or not ITEM_NONE")

Definition at line 50 of file MyGUI_Diagnostic.h.

## ◆ MYGUI_BASE_EXCEPT

#define MYGUI_BASE_EXCEPT | ( |  | desc,
|  |  | src )

Value:
throw MyGUI::Exception(desc, src, __FILE__, __LINE__)
MyGUI::Exception
Definition MyGUI_Exception.h:24

Definition at line 19 of file MyGUI_Diagnostic.h.

## ◆ MYGUI_DEBUG_ASSERT

#define MYGUI_DEBUG_ASSERT | ( |  | exp,
|  |  | dest )

Value:
MYGUI_ASSERT(exp, dest)

Definition at line 62 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 21 of file MyGUI_Diagnostic.h.

## ◆ MYGUI_LOG

#define MYGUI_LOG | ( |  | level,
|  |  | text )

Value:
MYGUI_LOGGING(MYGUI_LOG_SECTION, level, text)
MYGUI_LOG_SECTION
#define MYGUI_LOG_SECTION
Definition MyGUI_Diagnostic.h:15
MYGUI_LOGGING
#define MYGUI_LOGGING(section, level, text)
Definition MyGUI_LogManager.h:20

Definition at line 17 of file MyGUI_Diagnostic.h.

## ◆ MYGUI_LOG_FILENAME

#define MYGUI_LOG_FILENAME "MyGUI.log"

Definition at line 16 of file MyGUI_Diagnostic.h.

## ◆ MYGUI_LOG_SECTION

#define MYGUI_LOG_SECTION "Core"

Definition at line 15 of file MyGUI_Diagnostic.h.

## ◆ MYGUI_OBSOLETE

#define MYGUI_OBSOLETE | ( |  | text | ) |

Value:
[[deprecated(text)]]

Definition at line 68 of file MyGUI_Diagnostic.h.

## ◆ MYGUI_REGISTER_VALUE

#define MYGUI_REGISTER_VALUE | ( |  | map,
|  |  | value )

Value:
do \
{ \
MYGUI_LOG(Info, "Register value : '" << #value << "' = " << (int)value); \
map[#value] = value; \
} while (false)

Definition at line 56 of file MyGUI_Diagnostic.h.