Public Member Functions | Static Public Member Functions | List of all members
evdb::Printable Class Referenceabstract

Base class for printable objects. More...

#include <Printable.h>

Inheritance diagram for evdb::Printable:
evdb::Canvas evdb::ObjListCanvas evd::CalorView evd::Display3DView evd::Ortho3DView evd::TWQMultiTPCProjectionView evd::TWQProjectionView evdb::testCanvas1

Public Member Functions

 Printable ()
 
virtual ~Printable ()
 
virtual void Print (const char *filename)=0
 
virtual const char * Description () const
 
virtual const char * PrintTag () const =0
 

Static Public Member Functions

static void AddToListOfPrintables (const char *name, evdb::Printable *p)
 
static void RemoveFromListOfPrintables (evdb::Printable *p)
 
static std::map< std::string, evdb::Printable * > & GetPrintables ()
 

Detailed Description

Base class for printable objects.

Definition at line 15 of file Printable.h.

Constructor & Destructor Documentation

evdb::Printable::Printable ( )

Definition at line 18 of file Printable.cxx.

18 { }
evdb::Printable::~Printable ( )
virtual

Definition at line 22 of file Printable.cxx.

23  {
25  }
static void RemoveFromListOfPrintables(evdb::Printable *p)
Definition: Printable.cxx:47

Member Function Documentation

void evdb::Printable::AddToListOfPrintables ( const char *  name,
evdb::Printable p 
)
static

Definition at line 29 of file Printable.cxx.

31  {
33 
34  if (gsPrintables[s] == 0) {
35  gsPrintables[s] = p;
36  }
37  else {
38  if (gsPrintables[s] != p) {
39  std::cerr << "Printable: Name " << name << " reused.\n";
40  std::abort();
41  }
42  }
43  }
static QCString name
Definition: declinfo.cpp:673
std::string string
Definition: nybbler.cc:12
static std::map< std::string, evdb::Printable * > gsPrintables
Definition: Printable.cxx:14
p
Definition: test.py:223
static QCString * s
Definition: config.cpp:1042
virtual const char* evdb::Printable::Description ( ) const
inlinevirtual
std::map< std::string, evdb::Printable * > & evdb::Printable::GetPrintables ( )
static

Definition at line 61 of file Printable.cxx.

62  {
63  return gsPrintables;
64  }
static std::map< std::string, evdb::Printable * > gsPrintables
Definition: Printable.cxx:14
virtual void evdb::Printable::Print ( const char *  filename)
pure virtual

Implemented in evdb::ObjListCanvas, and evdb::Canvas.

virtual const char* evdb::Printable::PrintTag ( ) const
pure virtual
void evdb::Printable::RemoveFromListOfPrintables ( evdb::Printable p)
static

Definition at line 47 of file Printable.cxx.

48  {
51  for (; itr!=itrEnd; ++itr) {
52  if ( itr->second == p) {
53  gsPrintables.erase(itr);
54  return;
55  }
56  }
57  }
intermediate_table::iterator iterator
static std::map< std::string, evdb::Printable * > gsPrintables
Definition: Printable.cxx:14

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