#include "xmapents.h"

XMapEnts::XMapEnts()
    : XAsset()
    , mName()
    , mEntityString()
    , mNumEntityChars()
{
    SetType(ASSET_TYPE_MAP_ENTS);
    SetName("Map Ents");
}

XMapEnts::~XMapEnts()
{
    
}

void XMapEnts::Clear()
{
    mName.Clear();
    mEntityString.Clear();
    mNumEntityChars = 0;
}

void XMapEnts::ParseData(XDataStream *aStream)
{
    mName.ParsePtr(aStream, false);
    mEntityString.ParsePtr(aStream, false);

    *aStream >> mNumEntityChars;

    mName.ParseData(aStream);

    mEntityString.SetContentLength(mNumEntityChars);
    mEntityString.ParseData(aStream);
}
