ScalerManager.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (C) 2002  Ryan Nunn and The Pentagram Team
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  */
00018 
00019 #ifndef SCALERMANAGER_H_INCLUDED
00020 #define SCALERMANAGER_H_INCLUDED
00021 
00022 #include <vector>
00023 #include "istring.h"
00024 
00025 namespace Pentagram {
00026         class   Scaler;
00027 };
00028 
00029 //
00030 // This entire class is just static
00031 //
00032 class ScalerManager {
00033         std::vector<const Pentagram::Scaler*>           scalers;
00034 
00035         static ScalerManager *scaler_man;
00036 
00037         // Constructor
00038         ScalerManager();
00039 
00040 public:
00041         // Destructor
00042         ~ScalerManager();
00043 
00045         static ScalerManager *get_instance() { 
00046                         if (!scaler_man) scaler_man = new ScalerManager;
00047                         return scaler_man; 
00048         }
00049 
00051         uint32 AddScaler(const Pentagram::Scaler *scaler);
00052 
00053 
00055         uint32 GetNumScalers();
00056 
00058         uint32 GetIndexForName(const Pentagram::istring name);
00059 
00061         const char *GetNameForIndex(uint32 index);
00062 
00064         const Pentagram::Scaler *GetScaler(uint32 index);
00065 
00067         const Pentagram::Scaler *GetScaler(const Pentagram::istring name);
00068 
00070         const Pentagram::Scaler *GetPointScaler();
00071 };
00072 
00073 
00074 #endif // SCALERMANAGER_H_INCLUDED

Generated on Fri Jul 27 22:27:34 2007 for pentagram by  doxygen 1.4.7