Public Member Functions | Private Attributes
mbl_file_data_collector< T > Class Template Reference

Collect data objects and store them in a file. More...

#include <mbl_file_data_collector.h>

Inheritance diagram for mbl_file_data_collector< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 mbl_file_data_collector (const vcl_string &path)
 Constructor.
 mbl_file_data_collector (const mbl_data_collector_base &c)
 Constructor from mbl_data_collector_base.
 mbl_file_data_collector (const mbl_file_data_collector &c)
 Copy constructor.
virtual
mbl_file_data_collector< T > & 
operator= (const mbl_file_data_collector &c)
 Copy operator.
virtual ~mbl_file_data_collector ()
 Destructor.
virtual void clear ()
 Clear any stored data.
void delete_stuff ()
 delete stuff.
virtual void set_n_samples (int n)
 Hint about how many examples to expect.
virtual void record (const T &v)
 Record given object.
virtual mbl_data_wrapper< T > & data_wrapper ()
 Return object describing stored data.
short version_no () const
 Version number for I/O.
virtual vcl_string is_a () const
 Name of the class.
virtual bool is_class (vcl_string const &s) const
 Does the name of the class match the argument?.
virtual mbl_data_collector_baseclone () const
 Create a copy on the heap and return base class pointer.
virtual void print_summary (vcl_ostream &os) const
 Print class to os.
virtual void b_write (vsl_b_ostream &bfs) const
 Save class to binary file stream.
virtual void b_read (vsl_b_istream &bfs)
 Load class from binary file stream.

Private Attributes

vsl_b_ofstreambfs_
 binary file stream where the data is stored.
vcl_string path_
 path to binary data stream.
mbl_file_data_wrapper< T > * wrapper_
 wrapper object point to same file (return reference to this object!).

Detailed Description

template<class T>
class mbl_file_data_collector< T >

Collect data objects and store them in a file.

Definition at line 17 of file mbl_file_data_collector.h.


Constructor & Destructor Documentation

template<class T >
mbl_file_data_collector< T >::mbl_file_data_collector ( const vcl_string &  path)

Constructor.

bfs_( path ),.

Definition at line 22 of file mbl_file_data_collector.txx.

Constructor from mbl_data_collector_base.

Definition at line 48 of file mbl_file_data_collector.txx.

template<class T >
mbl_file_data_collector< T >::mbl_file_data_collector ( const mbl_file_data_collector< T > &  c)

Copy constructor.

Definition at line 58 of file mbl_file_data_collector.txx.

template<class T >
mbl_file_data_collector< T >::~mbl_file_data_collector ( ) [virtual]

Destructor.

Definition at line 132 of file mbl_file_data_collector.txx.


Member Function Documentation

template<class T >
void mbl_file_data_collector< T >::b_read ( vsl_b_istream bfs) [virtual]

Load class from binary file stream.

Implements mbl_data_collector_base.

Definition at line 246 of file mbl_file_data_collector.txx.

template<class T >
void mbl_file_data_collector< T >::b_write ( vsl_b_ostream bfs) const [virtual]

Save class to binary file stream.

Implements mbl_data_collector_base.

Definition at line 240 of file mbl_file_data_collector.txx.

template<class T >
void mbl_file_data_collector< T >::clear ( ) [virtual]

Clear any stored data.

Implements mbl_data_collector< T >.

Definition at line 162 of file mbl_file_data_collector.txx.

template<class T >
mbl_data_collector_base * mbl_file_data_collector< T >::clone ( ) const [virtual]

Create a copy on the heap and return base class pointer.

Implements mbl_data_collector_base.

Definition at line 228 of file mbl_file_data_collector.txx.

template<class T >
mbl_data_wrapper< T > & mbl_file_data_collector< T >::data_wrapper ( ) [virtual]

Return object describing stored data.

Return object describing the stored data.

Implements mbl_data_collector< T >.

Definition at line 195 of file mbl_file_data_collector.txx.

template<class T >
void mbl_file_data_collector< T >::delete_stuff ( )

delete stuff.

Delete stuff.

Definition at line 144 of file mbl_file_data_collector.txx.

template<class T>
virtual vcl_string mbl_file_data_collector< T >::is_a ( ) const [virtual]

Name of the class.

Reimplemented from mbl_data_collector_base.

template<class T >
bool mbl_file_data_collector< T >::is_class ( vcl_string const &  s) const [virtual]

Does the name of the class match the argument?.

Reimplemented from mbl_data_collector_base.

Definition at line 212 of file mbl_file_data_collector.txx.

template<class T >
mbl_file_data_collector< T > & mbl_file_data_collector< T >::operator= ( const mbl_file_data_collector< T > &  c) [virtual]

Copy operator.

Assignment operator.

virtual mbl_file_data_collector<T>& operator=( const mbl_data_collector_base& c);

Definition at line 77 of file mbl_file_data_collector.txx.

template<class T >
void mbl_file_data_collector< T >::print_summary ( vcl_ostream &  os) const [virtual]

Print class to os.

Implements mbl_data_collector_base.

Definition at line 234 of file mbl_file_data_collector.txx.

template<class T >
void mbl_file_data_collector< T >::record ( const T &  v) [virtual]

Record given object.

Implements mbl_data_collector< T >.

Definition at line 178 of file mbl_file_data_collector.txx.

template<class T >
void mbl_file_data_collector< T >::set_n_samples ( int  n) [virtual]

Hint about how many examples to expect.

Implements mbl_data_collector< T >.

Definition at line 171 of file mbl_file_data_collector.txx.

template<class T >
short mbl_file_data_collector< T >::version_no ( ) const

Version number for I/O.

Definition at line 220 of file mbl_file_data_collector.txx.


Member Data Documentation

template<class T>
vsl_b_ofstream* mbl_file_data_collector< T >::bfs_ [private]

binary file stream where the data is stored.

Definition at line 20 of file mbl_file_data_collector.h.

template<class T>
vcl_string mbl_file_data_collector< T >::path_ [private]

path to binary data stream.

Definition at line 23 of file mbl_file_data_collector.h.

template<class T>
mbl_file_data_wrapper<T>* mbl_file_data_collector< T >::wrapper_ [private]

wrapper object point to same file (return reference to this object!).

Definition at line 26 of file mbl_file_data_collector.h.


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