BinnerAxisFactory.cxx
Go to the documentation of this file.
1 /*
2  * HippoPlot BinnerAxisFactory class implementation
3  *
4  * Copyright (C) 2003 The Board of Trustees of The Leland Stanford
5  * Junior University. All Rights Reserved.
6  *
7  * $Id: BinnerAxisFactory.cxx,v 1.4 2005/10/30 00:10:09 pfkeb Exp $
8  *
9  */
10 
11 // for truncation warning in debug mode
12 #ifdef _MSC_VER
13 #include "msdevstudio/MSconfig.h"
14 #endif
15 
16 #include "BinnerAxisFactory.h"
17 
18 // List of default Binner container objects
19 #include "BinnerAxisLinear.h"
20 #include "BinnerAxisLog.h"
21 
22 namespace hippodraw {
23 
24 BinnerAxisFactory * BinnerAxisFactory::s_instance = 0;
25 
27 {
28 }
29 
31 {
32  if ( s_instance == 0 ) {
35  }
36  return s_instance;
37 }
38 
40 {
41  add ( new BinnerAxisLinear () );
42  add ( new BinnerAxisLog () );
43 }
44 
45 } // namespace hippodraw
hippodraw::BinnerAxisLog class interface
void initialize()
Initializes the factory with a set of default functions.
A Factory singleton class for creating objects whose class derives from BinnerAxis.
void add(BinnerAxis *)
Adds a prototype object to the list of prototypes.
The class for bins of logarithmically increasing widths.
Definition: BinnerAxisLog.h:32
BinnerAxisFactory()
A default constructor for prevent creation except by the itself or the derived classes.
static BinnerAxisFactory * instance()
Returns a pointer to the singleton instance.
hippodraw::BinnerAxisLinear class interface
static BinnerAxisFactory * s_instance
A pointer to the singleton object.
The class for the constant width bins.

Generated for HippoDraw Class Library by doxygen