#pragma once #include "Variation.h" /// /// VariationList class. /// namespace EmberNs { /// /// Since the list of variations is numerous, it's convenient to be able to make copies /// of specific ones. This class holds a list of pointers to variation objects for every /// variation available. Similar to the PaletteList class, a caller can look up a variation /// by name or ID and retrieve a copy of it. /// This class follows the singleton pattern. /// All variations are deleted upon destruction. /// Template argument expected to be float or double. /// template class EMBER_API VariationList: public Singleton> { public: const Variation* GetVariation(size_t index) const; const Variation* GetVariation(size_t index, eVariationType varType) const; Variation* GetVariationCopy(size_t index, T weight = 1) const; Variation* GetVariationCopy(size_t index, eVariationType varType, T weight = 1) const; const Variation* GetVariation(eVariationId id) const; Variation* GetVariationCopy(eVariationId id, T weight = 1) const; const Variation* GetVariation(const string& name) const; Variation* GetVariationCopy(const string& name, T weight = 1) const; const ParametricVariation* GetParametricVariation(size_t index) const; const ParametricVariation* GetParametricVariation(const string& name) const; ParametricVariation* GetParametricVariationCopy(eVariationId id, T weight = 1) const; const Variation* GetPreVariation(const string& name) const; const Variation* GetPostVariation(const string& name) const; int GetVariationIndex(const string& name) const; size_t Size() const; size_t RegSize() const; size_t PreSize() const; size_t PostSize() const; size_t ParametricSize() const; size_t NonParametricSize() const; const vector*>& AllVars() const; const vector*>& RegVars() const; const vector*>& PreVars() const; const vector*>& PostVars() const; const vector*>& NonParametricVariations() const; const vector*>& ParametricVariations() const; SINGLETON_DERIVED_DECL_T(VariationList, T); private: VariationList(); Variation* MakeCopyWithWeight(const Variation* var, T weight) const; template