50 {
if (
Key)
Key->
DecRef();
Key = o.Key; o.Key =
nullptr;
Value = std::move(o.Value);
return *
this; }
55 explicit operator bool()
const {
return Key !=
nullptr; }
63 return a.Key ==
b.Key;
71 virtual const char *
GetName()
const;
72 virtual void SetName (
const char *NewName =
nullptr);
94 virtual bool Delete() {
return false; }
133 void Thaw() { constant =
false; }
147 StdStrBuf ToJSON(
int depth = 10,
bool ignore_reference_parent =
false)
const;
165 typedef std::unordered_set<C4Value *> RefSet;
169 bool constant{
false};
178 std::shared_ptr<std::vector<const C4Property*> > properties;
179 std::vector<const C4Property*>::iterator iter;
183 void Reserve(
size_t additionalAmount);
196 if ((properties ==
nullptr || iter == properties->end()) && (other.properties ==
nullptr || other.iter == other.properties->end()))
198 return properties == other.properties && iter == other.iter;
203 return !(*
this == other);
274 const char *
GetName()
const override;
void CompileNewFunc(C4PropList *&pStruct, StdCompiler *pComp, C4ValueNumbers *rPar)
const C4Property * operator*() const
const C4Property * operator->() const
bool operator!=(const Iterator &other) const
bool operator==(const Iterator &other) const
virtual void SetName(const char *NewName=nullptr)
int32_t GetPropertyInt(C4PropertyName k, int32_t default_val=0) const
int32_t GetPropertyBool(C4PropertyName n, bool default_val=false) const
virtual C4Object * GetObject()
void CompileFunc(StdCompiler *pComp, C4ValueNumbers *)
C4AulFunc * GetFunc(C4PropertyName k) const
bool operator==(const C4PropList &b) const
virtual const char * GetName() const
virtual C4ValueArray * GetProperties() const
virtual class C4PropListStatic * IsStatic()
C4String * EnumerateOwnFuncs(C4String *prev=nullptr) const
virtual bool GetPropertyByS(const C4String *k, C4Value *pResult) const
C4ValueArray * GetPropertyArray(C4PropertyName n) const
virtual bool IsNumbered() const
virtual C4Effect * GetEffect()
bool HasProperty(C4String *k) const
virtual void SetOnFire(bool OnFire)
C4PropertyName GetPropertyP(C4PropertyName k) const
void RemoveCyclicPrototypes()
C4PropListStatic * FreezeAndMakeStaticRecursively(std::vector< C4Value > *prop_lists, const C4PropListStatic *parent=nullptr, C4String *key=nullptr)
const class C4PropListStatic * IsStatic() const
virtual void ResetProperty(C4String *k)
std::vector< C4String * > GetSortedLocalProperties(bool add_prototype=true) const
C4PropList * GetPrototype() const
StdStrBuf ToJSON(int depth=10, bool ignore_reference_parent=false) const
C4PropList * GetPropertyPropList(C4PropertyName k) const
void AppendDataString(StdStrBuf *out, const char *delim, int depth=3, bool ignore_reference_parent=false) const
C4PropList(C4PropList *prototype=nullptr)
C4String * GetPropertyStr(C4PropertyName k) const
virtual void Denumerate(C4ValueNumbers *)
virtual C4PropListNumbered * GetPropListNumbered()
virtual C4Def const * GetDef() const
C4Value Call(C4PropertyName k, C4AulParSet *pPars=nullptr, bool fPassErrors=false)
virtual void SetPropertyByS(C4String *k, const C4Value &to)
static C4PropList * New(C4PropList *prototype=nullptr)
virtual class C4MapScriptLayer * GetMapScriptLayer()
std::vector< C4String * > GetSortedProperties(const char *prefix, C4PropList *ignore_parent=nullptr) const
bool GetProperty(C4PropertyName k, C4Value *pResult) const
virtual class C4MapScriptMap * GetMapScriptMap()
void SetProperty(C4PropertyName k, const C4Value &to)
static C4PropListStatic * NewStatic(C4PropList *prototype, const C4PropListStatic *parent, C4String *key)
std::vector< C4String * > GetUnsortedProperties(const char *prefix, C4PropList *ignore_parent=nullptr) const
C4PropListNumbered(C4PropList *prototype=nullptr)
C4PropListNumbered * GetPropListNumbered() override
~C4PropListNumbered() override
static void ClearShelve()
static std::vector< C4PropListNumbered * > ShelvedPropLists
void CompileFunc(StdCompiler *pComp, C4ValueNumbers *numbers)
static int32_t GetEnumerationIndex()
static bool CheckPropList(C4PropList *)
static C4Set< C4PropListNumbered * > PropLists
static void ShelveNumberedPropLists()
static void UnshelveNumberedPropLists()
static void ClearNumberedPropLists()
static void SetEnumerationIndex(int32_t iMaxObjectNumber)
static C4PropList * GetByNumber(int32_t iNumber)
static void ResetEnumerationIndex()
bool IsNumbered() const override
static int32_t EnumerationIndex
static C4Set< C4PropListScript * > PropLists
~C4PropListScript() override
static void ClearScriptPropLists()
C4PropListScript(C4PropList *prototype=nullptr)
void RefCompileFunc(StdCompiler *pComp, C4ValueNumbers *numbers) const
C4RefCntPointer< C4String > ParentKeyName
C4String * GetParentKeyName()
StdStrBuf GetDataString() const
const C4PropListStatic * GetParent() const
const char * GetName() const override
~C4PropListStatic() override=default
const C4PropListStatic * Parent
C4PropListStatic * IsStatic() override
C4PropListStatic(C4PropList *prototype, const C4PropListStatic *parent, C4String *key)
C4PropListStaticMember(C4PropList *prototype, const C4PropListStatic *parent, C4String *key)
C4Property(C4String *Key, const C4Value &Value)
C4Property & operator=(const C4Property &o)
C4Property(const C4Property &o)
bool operator<(const C4Property &cmp) const
void CompileFunc(StdCompiler *pComp, C4ValueNumbers *)
C4Property(C4Property &&o)
const char * GetSafeKey() const
static bool Equals(const T &, const H &)
const char * GetCStr() const
C4PropList * _getPropList() const