PlacementId::init

This commit is contained in:
shibbo 2020-11-03 06:17:44 -05:00
parent fc1545f481
commit 2534d6cada
2 changed files with 11 additions and 1 deletions

View File

@ -22,7 +22,7 @@ namespace al
PlacementId();
PlacementId(const char *, const char *, const char *);
void set(const al::PlacementInfo &);
void init(const al::PlacementInfo &);
bool isEqual(const al::PlacementId &) const;
static bool isEqual(const al::PlacementId &, const al::PlacementId &);
bool isValid() const;

View File

@ -23,6 +23,16 @@ namespace al
: _0(p_0), mUnitConfigName(pUnitConfig), mID(pID), mCommonID(nullptr)
{ }
void PlacementId::init(const al::PlacementInfo &rInfo)
{
_0 = nullptr, mID = nullptr, mUnitConfigName = nullptr, mCommonID = nullptr;
rInfo._0.tryGetStringByKey(&mCommonID, "CommonId");
rInfo.mZoneIter.tryGetStringByKey(&mUnitConfigName, "UnitConfigName");
rInfo.mZoneIter.tryGetStringByKey(&mID, "Id");
rInfo._0.tryGetStringByKey(&_0, "Id");
}
bool PlacementId::isValid() const
{
bool ret;