2014-10-07 18:15:46 +00:00
|
|
|
#ifndef REZWORLD_H
|
|
|
|
#define REZWORLD_H
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <stack>
|
|
|
|
#include "ResourceDefinitions.h"
|
|
|
|
#include "Expression.h"
|
2014-10-08 00:52:34 +00:00
|
|
|
#include "ResourceFiles.h"
|
2014-10-07 18:15:46 +00:00
|
|
|
|
|
|
|
class RezWorld
|
|
|
|
{
|
|
|
|
friend class RezParser;
|
|
|
|
|
|
|
|
std::map<TypeSpec, TypeDefinitionPtr> types;
|
|
|
|
std::stack<FieldListPtr> fieldLists;
|
2014-10-07 22:41:40 +00:00
|
|
|
std::stack<IdentifierExprPtr> functionCalls;
|
2014-10-07 23:17:17 +00:00
|
|
|
std::stack<SwitchFieldPtr> switches;
|
2014-10-08 00:52:34 +00:00
|
|
|
|
|
|
|
Resources resources;
|
2014-10-07 18:15:46 +00:00
|
|
|
public:
|
|
|
|
RezWorld();
|
|
|
|
void addTypeDefinition(TypeSpec spec, TypeDefinitionPtr type);
|
|
|
|
|
|
|
|
TypeDefinitionPtr getTypeDefinition(ResType type, int id);
|
2014-10-08 00:52:34 +00:00
|
|
|
|
|
|
|
void addResource(ResType type, int id, CompoundExprPtr body);
|
|
|
|
|
|
|
|
Resources& getResources() { return resources; }
|
2014-10-09 20:15:13 +00:00
|
|
|
|
|
|
|
bool verboseFlag;
|
2014-10-07 18:15:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // REZWORLD_H
|