Defines | |
#define | NS_ASSERT(condition) |
#define | NS_ASSERT_MSG(condition, message) |
The assert macros are used to verify at runtime that a certain condition is true. If it is not true, the program halts. These checks are built into the program only in debugging builds. They are removed in optimized builds.
#define NS_ASSERT | ( | condition | ) |
Value:
do \ { \ if (!(condition)) \ { \ std::cerr << "assert failed. file=" << __FILE__ << \ ", line=" << __LINE__ << ", cond=\""#condition << \ "\"" << std::endl; \ int *a = 0; \ *a = 0; \ } \ } \ while (false)
condition | condition to verifiy. |
Referenced by ns3::CopyObject(), ns3::TagBuffer::ReadU8(), ns3::Buffer::Buffer::Iterator::ReadU8(), ns3::Object::Unref(), ns3::TagBuffer::WriteU8(), and ns3::Buffer::Buffer::Iterator::WriteU8().
#define NS_ASSERT_MSG | ( | condition, | |||
message | ) |
Value:
do \ { \ if (!(condition)) \ { \ std::cerr << message << std::endl; \ int *a = 0; \ *a = 0; \ } \ } \ while (false)
condition | condition to verifiy. | |
message | message to output |
Referenced by ns3::rapidnet::AggWrap::New().