MercuryDPM  Alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BaseObject.h File Reference
#include <iostream>

Go to the source code of this file.

Classes

class  BaseObject
 It is an abstract base class due to the purely virtual functions declared below. Even if the function is purely virtual, it does not imply that it cannot have a definition. Abstract classes are useful to define a interface. More...
 

Functions

std::ostream & operator<< (std::ostream &os, const BaseObject &o)
 Operator overloading for passing the data from the BaseObject "o" into the output stream. More...
 
std::istream & operator>> (std::istream &is, BaseObject &o)
 Operator overloading for reading the data from an input stream into the BAseObject "o". More...
 

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const BaseObject o 
)

Operator overloading for passing the data from the BaseObject "o" into the output stream.

Parameters
[in,out]os
[in]o
Returns
std::ostream &

Definition at line 35 of file BaseObject.cc.

References BaseObject::write().

36 {
37  o.write(os);
38  return os;
39 }
virtual void write(std::ostream &os) const =0
A purely virtual function which has an implementation which writes the name and the object id_ to the...
Definition: BaseObject.cc:133
std::istream& operator>> ( std::istream &  is,
BaseObject o 
)

Operator overloading for reading the data from an input stream into the BAseObject "o".

Parameters
[in]o
[in,out]is
Returns
std::istream&

Definition at line 46 of file BaseObject.cc.

References BaseObject::read().

47 {
48  o.read(is);
49  return (is);
50 }
virtual void read(std::istream &is)=0
A purely virtual method with an implementation which reads the index from the stream and assigns it t...
Definition: BaseObject.cc:124