1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00
OpenMW/apps/openmw/refdata.hpp
2010-07-02 17:21:27 +02:00

55 lines
1.2 KiB
C++

#ifndef REFDATA_H
#define REFDATA_H
#include <string>
#include "mwscript/locals.hpp"
namespace ESM
{
class Script;
}
namespace OMW
{
class RefData
{
std::string mHandle;
MWScript::Locals mLocals; // if we find the overhead of heaving a locals
// object in the refdata of refs without a script,
// we can make this a pointer later.
bool mHasLocals;
public:
RefData() : mHasLocals (false) {}
std::string getHandle()
{
return mHandle;
}
void setLocals (const ESM::Script& script)
{
if (!mHasLocals)
{
mLocals.configure (script);
mHasLocals = true;
}
}
void setHandle (const std::string& handle)
{
mHandle = handle;
}
MWScript::Locals& getLocals()
{
return mLocals;
}
};
}
#endif