BALL  1.4.1
composedEnergyProcessor.h
Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: composedEnergyProcessor.h,v 1.13 2005/12/23 17:01:43 amoll Exp $
00005 //
00006 
00007 #ifndef BALL_ENERGY_COMPOSEDENERGYPROCESSOR
00008 #define BALL_ENERGY_COMPOSEDENERGYPROCESSOR
00009 
00010 #ifndef BALL_COMMON_H
00011 # include <BALL/common.h>
00012 #endif
00013 
00014 #ifndef BALL_ENERGY_ENERGYPROCESSOR_H
00015 # include <BALL/ENERGY/energyProcessor.h>
00016 #endif
00017 
00018 namespace BALL
00019 {
00020   
00024   typedef std::list<EnergyProcessor*> EnergyProcessorList;
00025 
00034   class BALL_EXPORT ComposedEnergyProcessor
00035     : public EnergyProcessor
00036   {
00037 
00038     public:
00039 
00040     BALL_CREATE(ComposedEnergyProcessor)
00041 
00042     
00045 
00048     ComposedEnergyProcessor();
00049 
00052     ComposedEnergyProcessor(const ComposedEnergyProcessor& composed_energy_proc);
00053 
00056     ComposedEnergyProcessor(EnergyProcessorList proc_list);
00057 
00060     virtual ~ComposedEnergyProcessor();
00061 
00063 
00066 
00069     const ComposedEnergyProcessor& operator = 
00070       (const ComposedEnergyProcessor& proc);
00071 
00075     virtual void clear();
00076   
00078 
00081     
00084     virtual bool finish();
00085 
00087 
00090 
00093     void addComponent(EnergyProcessor* proc);
00094 
00097     void removeComponent(EnergyProcessor* proc);
00098 
00101     Size getNumberOfEnergyProcessors() const;
00102     
00104 
00107 
00110     bool operator == (const ComposedEnergyProcessor& proc) const;
00111 
00113 
00114     protected:
00115 
00116     EnergyProcessorList components_;
00117 
00118 
00119     private:
00120 
00121     /*_ check the validity of this instance. If one of the processors in
00122      * the list is invalid, then this instance of ComposedEnergyProcessor
00123      * is invalid 
00124     */
00125     void checkValidity();
00126 
00127   };
00128 } // namespace BALL
00129 #endif //  BALL_ENERGY_COMPOSEDENERGYPROCESSOR
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines