Alternaria
fit cylinders and ellipsoids to fungus
Printable Class Reference

Abstract class used to print objects and their members. More...

#include <printable.h>

Inheritance diagram for Printable:

List of all members.

Public Member Functions

virtual void print (std::ostream &out) const =0
 Prints this Printable to an output stream.
virtual ~Printable ()
 Deletes this Printable.

Static Public Member Functions

static const char * get_member_value (const char *member_name, std::istream &in) throw (jwscxx::base::Arg_error, jwscxx::base::IO_error)
 Returns the value for a printed member.
static const char * get_next_member_value (const char *member_value)
 Returns the next value of a printed member.

Detailed Description

Abstract class used to print objects and their members.

The format for printed objects is

     member name: member value

Definition at line 68 of file printable.h.


Constructor & Destructor Documentation

virtual Printable::~Printable ( ) [inline, virtual]

Deletes this Printable.

Definition at line 77 of file printable.h.


Member Function Documentation

virtual void Printable::print ( std::ostream &  out) const [pure virtual]

Prints this Printable to an output stream.

Implemented in Imaging_model, PSF_model, and Alternaria.

const char * Printable::get_member_value ( const char *  member_name,
std::istream &  in 
) throw (jwscxx::base::Arg_error, jwscxx::base::IO_error) [static]

Returns the value for a printed member.

Reads a line off the input stream as a member with format:

   member name: member value
Parameters:
member_nameName of the member to get the value of.
inInput stream to read the member line from.
Exceptions:
jwscxx::base::Arg_errorEither the member is not the one named or it is not formatted properly.
jwscxx::base::IO_errorCould not read a line from the input stream.
Returns:
A pointer to the member value or 0 if there is no value.

Definition at line 79 of file printable.cpp.

const char * Printable::get_next_member_value ( const char *  member_value) [static]

Returns the next value of a printed member.

The values must be separated by spaces.

Parameters:
member_valuePointer to the current member value.
Returns:
A pointer to the next member value or 0 if there are no more values.

Definition at line 135 of file printable.cpp.


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