improved lots of stuff
This commit is contained in:
41
tier2/fileformats/ini.cpp
Normal file
41
tier2/fileformats/ini.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
#include "tier2/fileformats/ini.h"
|
||||
#include "tier1/utlstring.h"
|
||||
#include "tier1/utlvector.h"
|
||||
|
||||
abstract_class CINISection: public IINISection
|
||||
{
|
||||
public:
|
||||
virtual bool GetBoolValue( const char *szKeyName ) override;
|
||||
virtual int GetIntValue( const char *szKeyName ) override;
|
||||
virtual const char *GetStringValue( const char *szKeyName ) override;
|
||||
virtual CUtlString GetUTLStringValue( const char *szKeyName ) override;
|
||||
|
||||
CUtlVector<CUtlString> m_values;
|
||||
};
|
||||
|
||||
class CINIFile: public IINIFile
|
||||
{
|
||||
virtual void GetSection( const char *szSectionName ) override;
|
||||
|
||||
CUtlVector<CINISection*> m_sections;
|
||||
};
|
||||
|
||||
class CINIManager: public IINIManager
|
||||
{
|
||||
public:
|
||||
virtual IINIFile *ReadString( const char *psz ) override;
|
||||
};
|
||||
|
||||
IINIFile *CINIManager::ReadString( const char *psz )
|
||||
{
|
||||
CINIFile *pFile = new CINIFile;
|
||||
return (IINIFile*)pFile;
|
||||
}
|
||||
|
||||
IINIManager *INIManager()
|
||||
{
|
||||
static CINIManager manager;
|
||||
return &manager;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user