X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Floader%2FParsedSource.h;fp=src%2Floader%2FParsedSource.h;h=e10b287aa661fbd9b5b9cdfac71c593d0714dc47;hb=ac3755adc509404528ef7de58695bf8e3bfb7dcd;hp=98ecd8423c401652f235c01a5ed7d68d40b1379b;hpb=f821f7bf3d3faa6aa27eec278350b861badfa03d;p=l2e.git diff --git a/src/loader/ParsedSource.h b/src/loader/ParsedSource.h index 98ecd84..e10b287 100644 --- a/src/loader/ParsedSource.h +++ b/src/loader/ParsedSource.h @@ -51,6 +51,9 @@ private: public: Type GetType() const { return type; } + bool IsArray() const { return GetType() == ARRAY_VALUES || GetType() == ARRAY_PROPS; } + bool IsObject() const { return GetType() == OBJECT; } + int ArraySize() const { return GetType() == ARRAY_VALUES ? GetValues().size() : GetPropertyLists().size(); } const std::vector &GetValues() const; const std::vector &GetPropertyLists() const;