Skip to content

Commit 81415f7

Browse files
committed
added the ablity to set owner of property but not have it added to that ownwer prop list
1 parent d735b52 commit 81415f7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Flux/flxCoreProps.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -593,15 +593,15 @@ class _flxPropertyTypedRW : public _flxPropertyBase<T, HIDDEN, SECURE>
593593
// properties.
594594
//
595595
// Also the containing object is needed to call the getter/setter methods on that object
596-
void operator()(Object *obj)
596+
void operator()(Object *obj, bool skipAdd = false)
597597
{
598598
// my_object must be derived from _flxPropertyContainer
599599
static_assert(std::is_base_of<_flxPropertyContainer, Object>::value, "TypedRW: invalid object");
600600

601601
my_object = obj;
602602
assert(my_object);
603603

604-
if (my_object)
604+
if (my_object && !skipAdd)
605605
my_object->addProperty(this);
606606

607607
// This is basically the "registration" & init step of this object.
@@ -879,15 +879,16 @@ class flxPropertyRWString : public _flxPropertyBaseString<HIDDEN, SECURE>
879879
// properties.
880880
//
881881
// Also the containing object is needed to call the getter/setter methods on that object
882-
void operator()(Object *obj)
882+
void operator()(Object *obj, bool skipAdd = false)
883883
{
884884
// Make sure the container type has spPropContainer as it's base class or it's a flxObject
885885
// Compile-time check
886886
static_assert(std::is_base_of<_flxPropertyContainer, Object>::value, "RWString: invalid object");
887887

888888
my_object = obj;
889889
assert(my_object);
890-
if (my_object)
890+
891+
if (my_object && !skipAdd)
891892
my_object->addProperty(this);
892893

893894
// This is basically the "registration" & init step of this object.

0 commit comments

Comments
 (0)