summaryrefslogtreecommitdiff
path: root/modules/fbx/fbx_parser/FBXProperties.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/fbx/fbx_parser/FBXProperties.h')
-rw-r--r--modules/fbx/fbx_parser/FBXProperties.h28
1 files changed, 9 insertions, 19 deletions
diff --git a/modules/fbx/fbx_parser/FBXProperties.h b/modules/fbx/fbx_parser/FBXProperties.h
index 0595b25fa7..bfd27ac94e 100644
--- a/modules/fbx/fbx_parser/FBXProperties.h
+++ b/modules/fbx/fbx_parser/FBXProperties.h
@@ -137,36 +137,31 @@ class PropertyTable {
public:
// in-memory property table with no source element
PropertyTable();
- PropertyTable(const PropertyTable *templateProps);
- PropertyTable(const ElementPtr element, const PropertyTable *templateProps);
- ~PropertyTable();
+ PropertyTable(const ElementPtr element);
+ virtual ~PropertyTable();
PropertyPtr Get(const std::string &name) const;
+ void Setup(ElementPtr ptr);
// PropertyTable's need not be coupled with FBX elements so this can be NULL
- ElementPtr GetElement() const {
+ ElementPtr GetElement() {
return element;
}
- PropertyMap &GetProperties() const {
+ PropertyMap &GetProperties() {
return props;
}
- const LazyPropertyMap &GetLazyProperties() const {
+ const LazyPropertyMap &GetLazyProperties() {
return lazyProps;
}
- const PropertyTable *TemplateProps() const {
- return templateProps;
- }
-
DirectPropertyMap GetUnparsedProperties() const;
private:
LazyPropertyMap lazyProps;
mutable PropertyMap props;
- const PropertyTable *templateProps = nullptr;
- const ElementPtr element = nullptr;
+ ElementPtr element = nullptr;
};
// ------------------------------------------------------------------------------------------------
@@ -191,16 +186,11 @@ template <typename T>
inline T PropertyGet(const PropertyTable *in, const std::string &name, bool &result, bool useTemplate = false) {
PropertyPtr prop = in->Get(name);
if (nullptr == prop) {
- if (!useTemplate) {
- result = false;
- return T();
- }
- const PropertyTable *templ = in->TemplateProps();
- if (nullptr == templ) {
+ if (nullptr == in) {
result = false;
return T();
}
- prop = templ->Get(name);
+ prop = in->Get(name);
if (nullptr == prop) {
result = false;
return T();