Printable.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file Printable.h
3 /// \brief Base class for printable objects
4 ///
5 /// \version $Id: Printable.h,v 1.2 2011-01-23 16:08:50 p-nusoftart Exp $
6 /// \author messier@indiana.edu
7 ////////////////////////////////////////////////////////////////////////
8 #ifndef EVDB_PRINTABLE_H
9 #define EVDB_PRINTABLE_H
10 #include <string>
11 #include <map>
12 
13 namespace evdb {
14  /// Base class for printable objects
15  class Printable {
16  public:
17  Printable();
18  virtual ~Printable();
19 
20  // Print the object to a file
21  virtual void Print(const char* filename) = 0;
22 
23  // Give a medium length description of what the view holds to be
24  // printed. Examples: "Full view of experiment", "3D View", ...
25  virtual const char* Description() const { return "??"; }
26 
27  // Give a short tag which can be included in filename to ID object printed
28  // Keep to ~4 characters
29  virtual const char* PrintTag() const = 0;
30 
31  public:
32  static void AddToListOfPrintables(const char* name, evdb::Printable* p);
34  static std::map<std::string,evdb::Printable*>& GetPrintables();
35 
36  };
37 }
38 
39 #endif // EVDB_PRINTABLE_H
40 ////////////////////////////////////////////////////////////////////////
41 
static QCString name
Definition: declinfo.cpp:673
static void RemoveFromListOfPrintables(evdb::Printable *p)
Definition: Printable.cxx:47
virtual const char * Description() const
Definition: Printable.h:25
Base class for printable objects.
Definition: Printable.h:15
virtual const char * PrintTag() const =0
Manage all things related to colors for the event display.
string filename
Definition: train.py:213
static std::map< std::string, evdb::Printable * > & GetPrintables()
Definition: Printable.cxx:61
virtual ~Printable()
Definition: Printable.cxx:22
p
Definition: test.py:223
static void AddToListOfPrintables(const char *name, evdb::Printable *p)
Definition: Printable.cxx:29
virtual void Print(const char *filename)=0