Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# Platform/Aperios1.3.2/GTAssert.h File Reference

This file contains macros for low level debugging. More...

`#include <stdio.h>`
`#include <iostream.h>`

Include dependency graph for GTAssert.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Defines
#define | ASSERT(cond)
| ASSERT prints a message if cond is false and NDEBUG is not defined.
#define | VERIFY(cond)
| VERIFY prints a message if cond is false and NDEBUG is not defined.
#define | PRINT(text) {cout << text << "\n"; cout.flush();}
| PRINT prints a text directly to the output if and NDEBUG is not defined.

## Detailed Description

This file contains macros for low level debugging.

Author:
  Thomas Röfer

Definition in file GTAssert.h.

## Define Documentation

#define ASSERT | ( | cond |  | ) |

| Value:
    {if(!(cond)) ::printf("ASSERT(" #cond ") failed in line %d of file " \
      __FILE__ ".\n",__LINE__);}
  ASSERT prints a message if cond is false and NDEBUG is not defined. ASSERT does not evaluate cond if NDEBUG is defined. Note that printf will not work in early stages of the creation of an Aperios process. Therefore, you will not get any feedback in such a case. If you are not sure whether an assertion failure will be reported at a certain position in the code, try ASSERT(false). Parameters:
  cond | The condition to be checked.
Definition at line 38 of file GTAssert.h. Referenced by VLCBallSpecialist::BallPointList::add(), GT2005BallSpecialist::BallPointList::add(), ColorTable64::addColorClass(), ColorTable64::addCuboidToColorClass(), VLCGoalRecognizer::analyzeGoalpost(), GT2005GoalRecognizer::analyzeGoalpost(), StdService::ColorCount(), InConfig::create(), ProcessCreator< T >::DoInit(), StdService::doneBuffer(), LinesTables2005::ObservationTable< xSize, ySize, cellSize, pointRes >::draw(), CommentService::enterComment(), Xabsl2HeadControlAgentInterface::execute(), Xabsl2BehaviorControlAgentInterface::execute(), KickLogger::execute(), GTXabsl2EngineExecutor::executeEngine(), StdService::fatalFlexError(), File::File(), SenderBase< MotorCommands >::fillEntryTable(), Receiver< T >::fillEntryTable(), MessageQueueBase::finishMessage(), Field::getClosestPoint(), LinesTables2005::ObservationTable< xSize, ySize, cellSize, pointRes >::getClosestPoint(), Histogram::getDebugKeyID(), Stopwatch::getDebugKeyID(), KickSelectionTable::getKickSelectionTableIDName(), NetSenderBase::getPackage(), NetReceiverBase::getPackage(), KickSelectionTable::getShortActionName(), StdService::getTokenDescription(), GT2005BehaviorControl::GT2005BehaviorControl(), SenderBase< MotorCommands >::handleMessage(), Receiver< T >::handleMessage(), Xabsl2HeadControlAgentInterface::handleMessage(), Xabsl2BehaviorControlAgentInterface::handleMessage(), ProcessBase::init(), ColorizerState::load(), Player::load(), StdService::lookupColorInfo(), MessageQueue::MessageQueue(), JPEGImage2::onDestEmpty(), JPEGImage::onDestEmpty(), TCPHandler::onReceive(), DDPHandler::onReceive(), JPEGImage2::onSrcEmpty(), JPEGImage::onSrcEmpty(), operator<<(), operator>>(), Sender< MessageQueue >::preparePackage(), File::printf(), MessageQueueBase::read(), File::read(), StdService::readInput(), RegDeleteRecursive(), ColorizerState::save(), VLCImageProcessor::scanColumns(), GT2005ImageProcessor::scanColumns(), GT2005GoalRecognizer::scanCrossBar(), VLCGoalRecognizer::scanOnImageBorder(), GT2005GoalRecognizer::scanOnImageBorder(), ModuleSelector::selectSolution(), SenderBase< MotorCommands >::sendPackage(), Image::setCameraInfo(), MessageQueueBase::setSelectedMessageForReading(), MessageQueueBase::setSize(), InConfig::skipWhitespace(), LogPlayer::statistics(), Xabsl2BehaviorControlAgentInterface::Xabsl2BehaviorControlAgentInterface(), Xabsl2HeadControlAgentInterface::Xabsl2HeadControlAgentInterface(), and StdService::~StdService().

#define VERIFY | ( | cond |  | ) |

| Value:
    {if(!(cond)) ::printf("VERIFY(" #cond ") failed in line %d of file " \
      __FILE__ ".\n",__LINE__);}
  VERIFY prints a message if cond is false and NDEBUG is not defined. VERIFY does evaluate cond even if NDEBUG is defined. Note that printf will not work in early stages of the creation of an Aperios process. Therefore, you will not get any feedback in such a case. If you are not sure whether an assertion failure will be reported at a certain position in the code, try ASSERT(false). Parameters:
  cond | The condition to be checked.
Definition at line 50 of file GTAssert.h. Referenced by ProcessCreator< T >::DoInit(), SystemCall::getMacAddress(), SystemCall::getRemainingPower(), SystemCall::getRobotDesign(), TCPEndpoint::listen(), MotorCommandsSender::MotorCommandsSender(), SoundDataSender::preparePackage(), ProcessCreator< T >::ProcessCreator(), ProcessCreator< T >::processNextFrame(), SystemCall::reboot(), SenderBase< MotorCommands >::sendPackage(), SoundDataSender::setPackage(), SharedSender< T >::setPackage(), Sender< MessageQueue >::setPackage(), MotorCommandsSender::setPackage(), SystemCall::shutdown(), SoundDataSender::SoundDataSender(), File::write(), File::~File(), MotorCommandsSender::~MotorCommandsSender(), and SoundDataSender::~SoundDataSender().

#define PRINT | ( | text |  | ) | {cout << text << "\n"; cout.flush();}

  | PRINT prints a text directly to the output if and NDEBUG is not defined. PRINT does not evaluate the parameter if NDEBUG is defined. Parameters:
  text | The text that will be printed.
Definition at line 58 of file GTAssert.h. Referenced by Watchdog::dump(), and Watchdog::leave().