libdballe  6.8
Public Member Functions | Data Fields | Protected Attributes
dballe::ArrayFile Class Reference
Inheritance diagram for dballe::ArrayFile:
dballe::File

Public Member Functions

 ArrayFile (Encoding type)
 
virtual Encoding type () const throw ()
 Get the name of the dba_file. More...
 
virtual bool read (Rawmsg &msg)
 Read a message from the file. More...
 
virtual void write (const Rawmsg &msg)
 Write the encoded message data to the file. More...
 
- Public Member Functions inherited from dballe::File
 File (const std::string &name, FILE *fd, bool close_on_exit=true)
 
FILE * stream () const throw ()
 Get the file stream.
 
const std::string & name () const throw ()
 Get the type of the dba_file. More...
 

Data Fields

std::vector< Rawmsgmsgs
 
unsigned current
 

Protected Attributes

Encoding file_type
 
- Protected Attributes inherited from dballe::File
std::string m_name
 Name of the file.
 
FILE * fd
 FILE structure used to read or write to the file.
 
bool close_on_exit
 Set to true if fd should be closed when dba_file_delete() is called.
 
int idx
 Index of the last message read from the file or written to the file.
 

Additional Inherited Members

- Static Public Member Functions inherited from dballe::File
static std::auto_ptr< Filecreate (Encoding type, const std::string &name, const char *mode)
 Create a dba_file structure. More...
 

Member Function Documentation

virtual bool dballe::ArrayFile::read ( Rawmsg msg)
virtual

Read a message from the file.

Parameters
msgThe Rawmsg that will hold the data.
Returns
true if a message has been found in the file, else false.

Implements dballe::File.

virtual Encoding dballe::ArrayFile::type ( ) const
throw (
)
virtual

Get the name of the dba_file.

Returns
The file name.

Implements dballe::File.

virtual void dballe::ArrayFile::write ( const Rawmsg msg)
virtual

Write the encoded message data to the file.

Parameters
msgThe ::dba_rawmsg with the encoded data to write

Reimplemented from dballe::File.


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