#include <SonarMagic.h>
Public Types | |
enum | FileType { FILE_TYPE_UNDETERMINED, FILE_TYPE_SIMULATOR } |
Public Member Functions | |
SonarMagic () | |
Ctor. | |
SonarMagic (const SonarMagic &rhs) | |
Copy ctor. | |
~SonarMagic () | |
Dtor. | |
SonarMagic & | operator= (const SonarMagic &rhs) |
Copy operator. | |
bool | read (ACE_FILE_IO &file) |
Read file's magic. | |
bool | write (ACE_FILE_IO &file, FileType type) |
Set and write file's magic. | |
FileType | type () const |
Give the determined file type. |
In order to positively identify the files used to support the Sonar system it is necessary to prepend each file with a "magic" indicator. Objects of this class provide the functions that may be used to manager these magic indicators.
Definition at line 19 of file SonarMagic.h.
enum SonarMagic::FileType |
SonarMagic::SonarMagic | ( | ) |
Ctor.
SonarMagic::SonarMagic | ( | const SonarMagic & | rhs | ) |
Copy ctor.
rhs | the reference object, |
SonarMagic::~SonarMagic | ( | ) |
Dtor.
SonarMagic& SonarMagic::operator= | ( | const SonarMagic & | rhs | ) |
Copy operator.
rhs | The reference object. |
bool SonarMagic::read | ( | ACE_FILE_IO & | file | ) |
Read file's magic.
The position of the file (tell()) will not be changed by this call.
file | The file in question. |
bool SonarMagic::write | ( | ACE_FILE_IO & | file, | |
FileType | type | |||
) |
Set and write file's magic.
The position of the file (tell()) will not be changed by this call.
file | The file in question. | |
type | The type of file. |
FileType SonarMagic::type | ( | ) | const |
Give the determined file type.