The Original CHomP Software
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
chomp::homengin::cubtype Class Referenceabstract

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< chomp::homengin::bitcodefile > chomp::homengin::cubfile_traits< chomp::homengin::bmdfile > chomp::homengin::cubfile_traits< chomp::homengin::cellistfile > chomp::homengin::cubfile_traits< chomp::homengin::cublistfile > chomp::homengin::cubfile_traits< chomp::homengin::winbmpfile > chomp::homengin::cubfile_traits< cubfileT >

Public Types

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

Public Member Functions

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

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. More...
 
static cubfilenewfile (const char *filename, const cubtype::cubtypelist &types=cubtype::cubtypes)
 Creates an appropriate cubical set corresponding to the given file. More...
 

Static Public Attributes

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

Protected Member Functions

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

Detailed Description

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

Definition at line 247 of file cubfiles.h.

Member Typedef Documentation

◆ cubtypelist

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

The type of a list of engines.

Definition at line 251 of file cubfiles.h.

Constructor & Destructor Documentation

◆ cubtype()

chomp::homengin::cubtype::cubtype ( )
inlineprotected

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

Definition at line 258 of file cubfiles.h.

259 {
260 cubtypes. push_back (this);
261 return;
262 }
static cubtypelist cubtypes
A list of all the engines that have been defined so far.
Definition: cubfiles.h:254

References cubtypes.

◆ ~cubtype()

virtual chomp::homengin::cubtype::~cubtype ( )
inlineprotectedvirtual

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

Definition at line 265 of file cubfiles.h.

266 {
267 cubtypelist::iterator it = find (cubtypes. begin (),
268 cubtypes. end (), this);
269 if (it != cubtypes. end ())
270 cubtypes. erase (it);
271 return;
272 }

References cubtypes.

Member Function Documentation

◆ compatible()

virtual bool chomp::homengin::cubtype::compatible ( const char *  filename) const
pure virtual

◆ describe()

virtual std::ostream & chomp::homengin::cubtype::describe ( std::ostream &  out) const
pure virtual

◆ name()

virtual const char * chomp::homengin::cubtype::name ( ) const
pure virtual

◆ newcubfile()

virtual cubfile * chomp::homengin::cubtype::newcubfile ( const char *  filename) const
pure virtual

◆ newfile()

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.

◆ showlist()

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

◆ cubtypes

cubtypelist chomp::homengin::cubtype::cubtypes
static

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

Definition at line 254 of file cubfiles.h.

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


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