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

InFile Class Reference

An PhysicalInStream that reads the data from a file. More...

#include <InStreams.h>

Inheritance diagram for InFile:

Inheritance graph
[legend]
Collaboration diagram for InFile:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 InFile ()
 Default constructor.

 ~InFile ()
 Destructor.

virtual bool exists () const
 The function states whether the file actually exists.

virtual bool getEof () const
 The function states whether the end of the file has been reached.


Protected Member Functions

void open (const char *name)
 opens the file.

virtual void readFromStream (void *p, int size)
 The function reads a number of bytes from the file.


Private Attributes

Filestream
 Object representing the file.


Detailed Description

An PhysicalInStream that reads the data from a file.

Definition at line 642 of file InStreams.h.


Constructor & Destructor Documentation

InFile::InFile  )  [inline]
 

Default constructor.

Definition at line 649 of file InStreams.h.

InFile::~InFile  )  [inline]
 

Destructor.

Definition at line 652 of file InStreams.h.


Member Function Documentation

virtual bool InFile::exists  )  const [inline, virtual]
 

The function states whether the file actually exists.

Returns:
Does the file exist?

Reimplemented from PhysicalInStream.

Definition at line 658 of file InStreams.h.

References File::exists().

Referenced by BB2004InvKinWalkingEngine::BB2004InvKinWalkingEngine(), BoxSpecialist::BoxSpecialist(), ChallengeSymbols::ChallengeSymbols(), DefaultTacticChooser::DefaultTacticChooser(), GT2004BasicBehaviorEvolveOmniParameters::GT2004BasicBehaviorEvolveOmniParameters(), GTXabsl2Profiler::importLogFile(), Logger::init(), Debug::init(), LinesTables2004::LinesTables2004(), RobotConfiguration::load(), Player::load(), KickSelectionTable::load(), IniFile::load(), GT2004ParametersSet::load(), ColorCorrector::load(), BB2004InvKinWalkingEngine::loadParameters(), GT2004SoundControl::loadWavefile(), Location::Location(), Logger::main(), LogPlayer::open(), RBallSpecialist2::RBallSpecialist2(), RDefaultStrategy::RDefaultStrategy(), GT2003MotionNetSpecialActions::readOdometryTable(), InvKinWalkingParameters::readValues(), Sensors::Sensors(), SolutionRequest::setDefaultSolutions(), ColorTableTSLMod::setup(), ColorTable64Mod::setup(), and ColorTable32KMod::setup().

Here is the call graph for this function:

virtual bool InFile::getEof  )  const [inline, virtual]
 

The function states whether the end of the file has been reached.

Returns:
End of file reached?

Implements PhysicalInStream.

Definition at line 665 of file InStreams.h.

References File::eof().

Referenced by GTXabsl2Profiler::importLogFile(), and IniFile::load().

Here is the call graph for this function:

void InFile::open const char *  name  )  [inline, protected]
 

opens the file.

Parameters:
name The name of the file to open. It will be interpreted as relative to the configuration directory.

Definition at line 674 of file InStreams.h.

Referenced by InBinaryFile::InBinaryFile(), InConfigFile::InConfigFile(), and InTextFile::InTextFile().

virtual void InFile::readFromStream void *  p,
int  size
[inline, protected, virtual]
 

The function reads a number of bytes from the file.

Parameters:
p The address the data is written to. Note that p must point to a memory area that is at least "size" bytes large.
size The number of bytes to be read.

Implements PhysicalInStream.

Definition at line 684 of file InStreams.h.

References File::read().

Here is the call graph for this function:


Member Data Documentation

File* InFile::stream [private]
 

Object representing the file.

Definition at line 645 of file InStreams.h.


The documentation for this class was generated from the following file:
Generated on Thu Sep 23 20:08:39 2004 for GT2004 by doxygen 1.3.6