// NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . #ifndef SCHEME_MANAGER_H #define SCHEME_MANAGER_H #include #include #include #include namespace NL3D { class CPSAttribMakerBase; } class CSchemeManager { public: /// dtor ~CSchemeManager(); typedef std::pair TSchemeInfo; // insert a new scheme in the collection. The scheme is then owned by this object void insertScheme(const std::string &name, NL3D::CPSAttribMakerBase *scheme); // get all the schemes with the given type void getSchemes(const std::string &type, std::vector &dest); // serial this collection void serial(NLMISC::IStream &f) throw(NLMISC::EStream); // swap this collection with another one void swap(CSchemeManager &other); // remove a scheme from the bank, given a pointer on it void remove(NL3D::CPSAttribMakerBase *am); // rename a scheme, given a pointer on it void rename(NL3D::CPSAttribMakerBase *am, const std::string &newName); protected: typedef std::pair TSchemeInfo; typedef std::multimap TSchemeMap; TSchemeMap _SchemeMap; }; extern CSchemeManager SchemeManager; #endif