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:

Include dependency graph

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

Included by dependency graph

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 GT2004BallSpecialist::BallPointList::add(), ColorTable64::addColorClass(), ColorTable64::addCuboidToColorClass(), BBInvKinIndividual::BBInvKinIndividual(), InConfig::create(), ProcessCreator< T >::DoInit(), Xabsl2HeadControlAgentInterface::execute(), Xabsl2BehaviorControlAgentInterface::execute(), KickLogger::execute(), GTXabsl2EngineExecutor::executeEngine(), File::File(), SenderBase< MotorCommands >::fillEntryTable(), Receiver< T >::fillEntryTable(), MessageQueueBase::finishMessage(), Field::getClosestPoint(), Histogram::getDebugKeyID(), Stopwatch::getDebugKeyID(), KickSelectionTable::getKickSelectionTableIDName(), NetSenderBase::getPackage(), NetReceiverBase::getPackage(), BBInvKinIndividual::getParameters(), KickSelectionTable::getShortActionName(), GT2004BehaviorControl::GT2004BehaviorControl(), SenderBase< MotorCommands >::handleMessage(), Receiver< T >::handleMessage(), Xabsl2HeadControlAgentInterface::handleMessage(), Xabsl2BehaviorControlAgentInterface::handleMessage(), ProcessBase::init(), BBInvKinIndividual::init(), Player::load(), MessageQueue::MessageQueue(), JPEGImage::onDestEmpty(), TCPHandler::onReceive(), DDPHandler::onReceive(), JPEGImage::onSrcEmpty(), operator<<(), operator>>(), Sender< MessageQueue >::preparePackage(), File::printf(), MessageQueueBase::read(), File::read(), TemplateTable< 50000 >::sample(), ModuleSelector::selectSolution(), SenderBase< MotorCommands >::sendPackage(), Image::setCameraInfo(), MessageQueueBase::setSelectedMessageForReading(), MessageQueueBase::setSize(), InConfig::skipWhitespace(), Xabsl2BehaviorControlAgentInterface::Xabsl2BehaviorControlAgentInterface(), and Xabsl2HeadControlAgentInterface::Xabsl2HeadControlAgentInterface().

#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(), 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.


Generated on Thu Sep 23 20:00:18 2004 for GT2004 by doxygen 1.3.6