Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes

chomp::homengin::cellistfile Class Reference

Text list of cubical cells. More...

#include <cubfiles.h>

Inheritance diagram for chomp::homengin::cellistfile:
chomp::homengin::cubfile

List of all members.

Public Member Functions

 cellistfile (const char *filename)
 The constructor.
int dim () const
 What is the dimension of the set of cubes?
int count () const
 How many cubes are there in the set?
bool bitmaptype () const
 Is this a bitmap type of set of cubes?
bool elementary () const
 Is this a set of elementary cubes, as opposed to full cubes?
int boundingbox (int *mincoord, int *maxcoord) const
 Determines the bounding box of the set of cubical cells.
int readcubes (chomp::homology::CubicalComplex &s) const
 Reads a set of cubical cells from the file.
int readcubes (chomp::homology::SetOfCubes &s) const
 Reads a cubical set from the file.
int readcubes (int *&sizes, char *&bytes, int padding=0, bool power2=false) const
 Reads a bitmap from a file.

Static Public Member Functions

static const char * name ()
 The name of this type of a cubical set.
static std::ostream & describe (std::ostream &out)
 Describes this particular type of a set of cubes.
static bool compatible (const char *filename)
 Verifies if the file format is compatible with this cubfile type.

Private Member Functions

void analyze () const
 Analyzes the file to determine the number of cubes and the scope of their coordinates.

Static Private Attributes

static cubfile_traits
< cellistfile
t
 Add this type of a cubical set to the list.

Detailed Description

Text list of cubical cells.

Definition at line 432 of file cubfiles.h.


Constructor & Destructor Documentation

chomp::homengin::cellistfile::cellistfile ( const char *  filename  )  [inline]

The constructor.

Definition at line 509 of file cubfiles.h.

                                                    : cubfile (filename)
{
        return;
} /* cellistfile::cellistfile */


Member Function Documentation

void chomp::homengin::cellistfile::analyze (  )  const [private]

Analyzes the file to determine the number of cubes and the scope of their coordinates.

Referenced by boundingbox(), and count().

bool chomp::homengin::cellistfile::bitmaptype (  )  const [inline, virtual]

Is this a bitmap type of set of cubes?

Reimplemented from chomp::homengin::cubfile.

Definition at line 450 of file cubfiles.h.

        {
                return false;
        }

int chomp::homengin::cellistfile::boundingbox ( int *  mincoord,
int *  maxcoord 
) const [inline, virtual]

Determines the bounding box of the set of cubical cells.

Reimplemented from chomp::homengin::cubfile.

Definition at line 462 of file cubfiles.h.

References chomp::homengin::cubfile::_min, and analyze().

        {
                if (!_min. size ())
                        analyze ();
                return cubfile::boundingbox (mincoord, maxcoord);
        }

static bool chomp::homengin::cellistfile::compatible ( const char *  filename  )  [static]

Verifies if the file format is compatible with this cubfile type.

Reimplemented from chomp::homengin::cubfile.

int chomp::homengin::cellistfile::count (  )  const [inline, virtual]

How many cubes are there in the set?

Reimplemented from chomp::homengin::cubfile.

Definition at line 442 of file cubfiles.h.

References chomp::homengin::cubfile::_count, and analyze().

        {
                if (_count < 0)
                        analyze ();
                return _count;
        }

static std::ostream& chomp::homengin::cellistfile::describe ( std::ostream &  out  )  [static]

Describes this particular type of a set of cubes.

Reimplemented from chomp::homengin::cubfile.

int chomp::homengin::cellistfile::dim (  )  const [virtual]

What is the dimension of the set of cubes?

Reimplemented from chomp::homengin::cubfile.

bool chomp::homengin::cellistfile::elementary (  )  const [inline, virtual]

Is this a set of elementary cubes, as opposed to full cubes?

Reimplemented from chomp::homengin::cubfile.

Definition at line 456 of file cubfiles.h.

        {
                return true;
        }

static const char* chomp::homengin::cellistfile::name (  )  [inline, static]

The name of this type of a cubical set.

Reimplemented from chomp::homengin::cubfile.

Definition at line 470 of file cubfiles.h.

        {
                return "text list of cubical cells";
        }

int chomp::homengin::cellistfile::readcubes ( chomp::homology::CubicalComplex s  )  const [virtual]

Reads a set of cubical cells from the file.

Reimplemented from chomp::homengin::cubfile.

int chomp::homengin::cellistfile::readcubes ( chomp::homology::SetOfCubes s  )  const [inline, virtual]

Reads a cubical set from the file.

Reimplemented from chomp::homengin::cubfile.

Definition at line 485 of file cubfiles.h.

        {
                throw "Trying to read cubical cells as a set of full cubes.";
        }

int chomp::homengin::cellistfile::readcubes ( int *&  sizes,
char *&  bytes,
int  padding = 0,
bool  power2 = false 
) const [inline, virtual]

Reads a bitmap from a file.

Reimplemented from chomp::homengin::cubfile.

Definition at line 491 of file cubfiles.h.

        {
                throw "Trying to read cubical cells as a bitmap.";
        }


Member Data Documentation

Add this type of a cubical set to the list.

Definition at line 503 of file cubfiles.h.


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