diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-07-28 13:36:03 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-07-28 13:36:03 +0400 |
commit | 7296600434c49b40215ba842af73a8b1517e12eb (patch) | |
tree | ba41a61f147073c91cf370c1f470b7c519397766 /intern/audaspace/FX/AUD_EffectFactory.h | |
parent | 3e3f874a65e9c20353fdc26a20a2f5da9b41e90e (diff) |
Audaspace: HUGE Refactor.
Some points of the refactor not sorted by importance:
* Fixed immutability of readers and factories (there are exceptions...)
* Fixed copy constructors and = operators
* Removed messaging system
* Removed reader types
* Added const where possible
* Using initalisers when possible
* Avoided use of pointers when possible
* Removed AUD_NEW and AUD_DELETE macros
* Removed useless NULL pointer checks
* Fixed exception catching
* Fixed some yet unknown bugs
* Lots of other stuff
Diffstat (limited to 'intern/audaspace/FX/AUD_EffectFactory.h')
-rw-r--r-- | intern/audaspace/FX/AUD_EffectFactory.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/intern/audaspace/FX/AUD_EffectFactory.h b/intern/audaspace/FX/AUD_EffectFactory.h index 67259b9e6c3..fd3746d0da3 100644 --- a/intern/audaspace/FX/AUD_EffectFactory.h +++ b/intern/audaspace/FX/AUD_EffectFactory.h @@ -34,6 +34,11 @@ */ class AUD_EffectFactory : public AUD_IFactory { +private: + // hide copy constructor and operator= + AUD_EffectFactory(const AUD_EffectFactory&); + AUD_EffectFactory& operator=(const AUD_EffectFactory&); + protected: /** * If there is no reader it is created out of this factory. @@ -44,9 +49,12 @@ protected: * Returns the reader created out of the factory. * This method can be used for the createReader function of the implementing * classes. - * \return The reader created out of the factory or NULL if there is none. + * \return The reader created out of the factory. */ - AUD_IReader* getReader(); + inline AUD_IReader* getReader() const + { + return m_factory->createReader(); + } public: /** @@ -58,19 +66,13 @@ public: /** * Destroys the factory. */ - virtual ~AUD_EffectFactory() {} - - /** - * Sets the input factory. - * \param factory The input factory. - */ - void setFactory(AUD_IFactory* factory); + virtual ~AUD_EffectFactory(); /** * Returns the saved factory. * \return The factory or NULL if there has no factory been saved. */ - AUD_IFactory* getFactory(); + AUD_IFactory* getFactory() const; }; #endif //AUD_EFFECTFACTORY |