Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions

chomp::homengin::cubtype Class Reference

A class that holds pointers to the traits of all the cubical file types. More...

#include <cubfiles.h>

Inheritance diagram for chomp::homengin::cubtype:
chomp::homengin::cubfile_traits< cubfileT >

List of all members.

Public Types

typedef std::vector< const
cubtype * > 
cubtypelist
 The type of a list of engines.

Public Member Functions

virtual const char * name () const =0
 The name of the set of cubes.
virtual std::ostream & describe (std::ostream &out) const =0
 Describe the given type of cubical sets.
virtual bool compatible (const char *filename) const =0
 Verifies if the file format is compatible with this cubfile type.
virtual cubfilenewcubfile (const char *filename) const =0
 Creates a new cubfile object of the desired type.

Static Public Member Functions

static std::ostream & showlist (std::ostream &out, const cubtype::cubtypelist &types=cubtype::cubtypes)
 Shows a list of available cubical set types with descriptions.
static cubfilenewfile (const char *filename, const cubtype::cubtypelist &types=cubtype::cubtypes)
 Creates an appropriate cubical set corresponding to the given file.

Static Public Attributes

static cubtypelist cubtypes
 A list of all the engines that have been defined so far.

Protected Member Functions

 cubtype ()
 The constructor: Add the cubical file traits to the list.
virtual ~cubtype ()
 The destructor: Remove the cubical file traits from the list.

Detailed Description

A class that holds pointers to the traits of all the cubical file types.

Definition at line 248 of file cubfiles.h.


Member Typedef Documentation

typedef std::vector<const cubtype *> chomp::homengin::cubtype::cubtypelist

The type of a list of engines.

Definition at line 252 of file cubfiles.h.


Constructor & Destructor Documentation

chomp::homengin::cubtype::cubtype (  )  [inline, protected]

The constructor: Add the cubical file traits to the list.

Definition at line 259 of file cubfiles.h.

References cubtypes.

        {
                cubtypes. push_back (this);
                return;
        }

virtual chomp::homengin::cubtype::~cubtype (  )  [inline, protected, virtual]

The destructor: Remove the cubical file traits from the list.

Definition at line 266 of file cubfiles.h.

References cubtypes.

        {
                cubtypelist::iterator it = find (cubtypes. begin (),
                        cubtypes. end (), this);
                if (it != cubtypes. end ())
                        cubtypes. erase (it);
                return;
        }


Member Function Documentation

virtual bool chomp::homengin::cubtype::compatible ( const char *  filename  )  const [pure virtual]
virtual std::ostream& chomp::homengin::cubtype::describe ( std::ostream &  out  )  const [pure virtual]
static cubfile* chomp::homengin::cubtype::newfile ( const char *  filename,
const cubtype::cubtypelist types = cubtype::cubtypes 
) [static]

Creates an appropriate cubical set corresponding to the given file.

Returns the address of a new object. Throws an exception in case of failure.

static std::ostream& chomp::homengin::cubtype::showlist ( std::ostream &  out,
const cubtype::cubtypelist types = cubtype::cubtypes 
) [static]

Shows a list of available cubical set types with descriptions.


Member Data Documentation

A list of all the engines that have been defined so far.

Definition at line 255 of file cubfiles.h.

Referenced by cubtype(), and ~cubtype().


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