janwas
e2eb5b2610
mostly straightforward except for CVSFile / Filesystem. moved the former into the newly created latter component. removed VFSUtil entirely (that functionality is available from lib/file/file_system_util.h) Xeromyces.cpp: simplify buffer handling since smart pointers are now in play. also use WriteBuffer instead of membuffer. This was SVN commit r5519.
38 lines
1.0 KiB
C++
38 lines
1.0 KiB
C++
//FormationCollection.h
|
|
|
|
//Nearly identical to EntityTemplateCollection and associates i.e. EntityTemplate, Entity.
|
|
//This is the manager of the entity formation "templates"
|
|
|
|
|
|
#ifndef INCLUDED_FORMATIONCOLLECTION
|
|
#define INCLUDED_FORMATIONCOLLECTION
|
|
|
|
#include <vector>
|
|
#include "ps/CStr.h"
|
|
#include "ps/Singleton.h"
|
|
#include "ps/Filesystem.h"
|
|
#include "Formation.h"
|
|
|
|
#define g_EntityFormationCollection CFormationCollection::GetSingleton()
|
|
|
|
|
|
class CFormationCollection : public Singleton<CFormationCollection>
|
|
{
|
|
|
|
typedef std::map<CStrW, CFormation*> templateMap;
|
|
typedef std::map<CStrW, CStr> templateFilenameMap;
|
|
templateMap m_templates;
|
|
templateFilenameMap m_templateFilenames;
|
|
public:
|
|
~CFormationCollection();
|
|
CFormation* GetTemplate( const CStrW& formationType );
|
|
int LoadTemplates();
|
|
void LoadFile( const VfsPath& path );
|
|
|
|
// Create a list of the names of all base entities, excluding template_*,
|
|
// for display in ScEd's entity-selection box.
|
|
void GetFormationNames( std::vector<CStrW>& names );
|
|
};
|
|
|
|
#endif
|