#include <Printable.h>
Inheritance diagram for evdb::Printable:

Public Member Functions | |
| Printable () | |
| virtual | ~Printable () |
| virtual void | Print (const char *filename)=0 |
| Print the object to a file. | |
| virtual const char * | Description () const |
| virtual const char * | PrintTag () const=0 |
Static Public Member Functions | |
| void | AddToListOfPrintables (const char *name, Printable *p) |
| void | RemoveFromListOfPrintables (Printable *p) |
| std::map< std::string, Printable * > & | GetPrintables () |
Definition at line 16 of file Printable.h.
|
|
Definition at line 18 of file Printable.cxx.
00018 { }
|
|
|
Definition at line 22 of file Printable.cxx.
00023 {
00024 Printable::RemoveFromListOfPrintables(this);
00025 }
|
|
||||||||||||
|
Definition at line 29 of file Printable.cxx. References gsPrintables. Referenced by testCanvas1::testCanvas1(), and testCanvas2::testCanvas2().
00031 {
00032 std::string s(name);
00033
00034 if (gsPrintables[s] == 0) {
00035 gsPrintables[s] = p;
00036 }
00037 else {
00038 if (gsPrintables[s] != p) {
00039 std::cerr << "Printable: Name " << name << " reused.\n";
00040 abort();
00041 }
00042 }
00043 }
|
|
|
Give a medium length description of what the view holds to be printed. Examples: "Full view of experiment", "3D View", ... Reimplemented in evd::DetectorView, evd::PlaneView, evdb::Canvas, testCanvas1, and testCanvas2. Definition at line 26 of file Printable.h.
00026 { return "??"; }
|
|
|
Definition at line 61 of file Printable.cxx. References gsPrintables.
00062 {
00063 return gsPrintables;
00064 }
|
|
|
Print the object to a file.
Implemented in evdb::Canvas. Referenced by evdb::PrintDialog::Print(). |
|
|
Give a short tag which can be included in filename to ID object printed Keep to ~4 characters Implemented in evd::DetectorView, evd::PlaneView, evdb::Canvas, testCanvas1, and testCanvas2. |
|
|
Definition at line 47 of file Printable.cxx. References gsPrintables. Referenced by testCanvas1::~testCanvas1(), and testCanvas2::~testCanvas2().
00048 {
00049 std::map<std::string,Printable*>::iterator itr(gsPrintables.begin());
00050 std::map<std::string,Printable*>::iterator itrEnd(gsPrintables.end());
00051 for (; itr!=itrEnd; ++itr) {
00052 if ( itr->second == p) {
00053 gsPrintables.erase(itr);
00054 return;
00055 }
00056 }
00057 }
|
1.3.5