SonarMagic Class Reference

Used to handle the magic indicators used to determine Sonar files. More...

#include <SonarMagic.h>

List of all members.

Public Types

enum  FileType { FILE_TYPE_UNDETERMINED, FILE_TYPE_SIMULATOR }

Public Member Functions

 SonarMagic ()
 Ctor.
 SonarMagic (const SonarMagic &rhs)
 Copy ctor.
 ~SonarMagic ()
 Dtor.
SonarMagicoperator= (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.


Detailed Description

Used to handle the magic indicators used to determine Sonar files.

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.


Member Enumeration Documentation

enum SonarMagic::FileType

Enumerator:
FILE_TYPE_UNDETERMINED 
FILE_TYPE_SIMULATOR 

Definition at line 24 of file SonarMagic.h.


Constructor & Destructor Documentation

SonarMagic::SonarMagic (  ) 

Ctor.

SonarMagic::SonarMagic ( const SonarMagic rhs  ) 

Copy ctor.

Parameters:
rhs the reference object,

SonarMagic::~SonarMagic (  ) 

Dtor.


Member Function Documentation

SonarMagic& SonarMagic::operator= ( const SonarMagic rhs  ) 

Copy operator.

Parameters:
rhs The reference object.
Returns:
This 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.

Parameters:
file The file in question.
Returns:
If the magic cannot be determined then return false.

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.

Parameters:
file The file in question.
type The type of file.
Returns:
If the type does not exist or if it cannot be written to the media the return false.

FileType SonarMagic::type (  )  const

Give the determined file type.

Returns:
One of the values from FileType.


The documentation for this class was generated from the following file: