Go to the documentation of this file.
11 static const char*
Get() {
return typeid(T).name(); }
36 std::shared_ptr<Core::DbgInfo>
getDbgInfo()
const override;
43 virtual std::vector<Core::DocObject*>
getLinks()
override;
48 bool mRunningCopy =
false;
83 void setValue(
const std::unordered_set<Core::DocObject*>& linkset);
86 const std::unordered_set<Core::DocObject*>&
getValue()
const;
89 void addLinks(
const std::unordered_set<Core::DocObject*>& linkset);
106 virtual std::vector<Core::DocObject*>
getLinks()
override;
116 template <
typename T>
124 const std::unordered_set<T>&
getValue()
const {
return *(
const std::unordered_set<T>*)(&
_linkSet); }
136 template <
typename T>
144 const std::unordered_set<T>&
getValue()
const {
return *(
const std::unordered_set<T>*)(&
_linkSet); }
152 writer <<
"<Link value=\"" << (*
_linkSet.begin())->getId() <<
"\"/>";
154 writer <<
"<Link value=\""
171 template <
typename T>
173 template <
typename U>
void restore(Base::AbstractXMLReader &reader, Base::PersistenceVersion &version) override
This method is used to restore properties from an XML document.
Definition: PropertyBackLink.h:19
~PropertyBackLinkSetBase()
static const Type badType(void)
Definition: Type.h:97
Core::Variant getVariant(void) const
Definition: CoreDocument.h:269
PropertyKind
Definition: Property.h:42
Definition: PropertyLinkBaseBase.h:8
void addLinks(const std::unordered_set< T > &linkset)
Definition: PropertyBackLink.h:167
bool isEqual(const Property *) const override
compare properties
std::shared_ptr< Core::DbgInfo > getDbgInfo() const override
Returns the debug information for this property.
virtual bool addLink(DocObject *o) override
std::map< Core::DocObject *, Core::DocObject * > DocObjectMap
Definition: DocObject.h:50
virtual void paste(const Core::Property &from) override
Paste the value from the property (mainly for Undo/Redo and transactions)
void setValue(const std::unordered_set< T > &linkset)
Definition: PropertyBackLink.h:123
void setValue(T o)
Definition: PropertyBackLink.h:62
Definition: PropertyBackLink.h:138
Core::DocObject * getValue() const
const std::unordered_set< T > & getValue() const
Definition: PropertyBackLink.h:144
bool addLink(T link)
Definition: PropertyBackLink.h:164
void save(Base::AbstractWriter &writer, Base::PersistenceVersion &save_version) override
This method is used to save properties or very small amounts of data to an XML document.
Definition: PropertyBackLink.h:118
PropertyBackLinkBase(void)
bool removeLink(T link)
Definition: PropertyBackLink.h:165
virtual Core::Property * copy(void) const override
Returns a new copy of the property (mainly for Undo/Redo and transactions). The copy has no container...
bool setValueFromVariant(const Core::Variant &value) override
static const Type createType(const Type parent, const char *name, instantiationMethod method=0)
std::shared_ptr< Core::DbgInfo > getDbgInfo() const override
Returns the debug information for this property.
void copyValue(Core::Property *p) override
Definition: DocObject.h:54
std::unordered_set< Core::DocObject * > _linkSet
Definition: PropertyBackLink.h:109
void setValue(const std::unordered_set< T > &linkset)
Definition: PropertyBackLink.h:143
Definition: Persistence.h:13
Core::DocObject * _link
Definition: PropertyBackLink.h:46
Definition: PropertyBackLink.h:76
virtual void paste(const Core::Property &from) override
Paste the value from the property (mainly for Undo/Redo and transactions)
int documentVersionMinor
Definition: Persistence.h:17
bool setValueFromVariant(const Core::Variant &value)
bool isEqual(const Property *) const override
compare properties
void setValue(const std::unordered_set< Core::DocObject * > &linkset)
virtual std::vector< Core::DocObject * > getLinks() override
virtual bool removeLink(DocObject *o) override
void save(Base::AbstractWriter &writer, Base::PersistenceVersion &save_version) override
This method is used to save properties or very small amounts of data to an XML document.
Definition: PropertyBackLink.h:146
void restore(Base::AbstractXMLReader &reader, Base::PersistenceVersion &version) override
This method is used to restore properties from an XML document.
const std::unordered_set< T > & getValue() const
Definition: PropertyBackLink.h:124
void setValue(Core::DocObject *o)
const std::unordered_set< Core::DocObject * > & getValue() const
Definition: AbstractXMLReader.h:7
bool hasLink(Core::DocObject *o) const
Definition: PropertyBackLink.h:57
void save(Base::AbstractWriter &writer, Base::PersistenceVersion &save_version) override
This method is used to save properties or very small amounts of data to an XML document.
virtual const Core::PropertyKind getPropertyKind(void) const override
bool removeLink(T link)
Definition: PropertyBackLink.h:127
LX_CORE_EXPORT Version & version
bool addLink(T link)
Definition: PropertyBackLink.h:126
T getValue() const
Definition: PropertyBackLink.h:63
Definition: Property.h:72
void copyValue(Core::Property *p)
PropertyBackLinkSetBase()
void addLinks(const std::unordered_set< Core::DocObject * > &linkset)
int documentVersionMajor
Definition: Persistence.h:16
void addLinks(const std::unordered_set< T > &linkset)
Definition: PropertyBackLink.h:129
Definition: PropertyBackLink.h:10
virtual const Core::PropertyKind getPropertyKind(void) const override
virtual void deepCopy(Core::Property *p, Core::CoreDocument *dest_doc, DocObjectMap ©Map) override
#define TYPESYSTEM_HEADER()
define for subclassing Base::BaseClass
Definition: Base.h:12
virtual std::vector< Core::DocObject * > getLinks() override
DECLARE_PROPERTY_FACTORY(PropertyAxis1_Factory, Core::PropertyAxis1)
void deepCopy(Core::Property *p, Core::CoreDocument *dest_doc, DocObjectMap ©Map) override
virtual Core::Property * copy(void) const override
Returns a new copy of the property (mainly for Undo/Redo and transactions). The copy has no container...
bool removeLink(Core::DocObject *o) override
static const char * Get()
Definition: PropertyBackLink.h:11
Core::Variant getVariant(void) const
bool addLink(Core::DocObject *o) override