OpenLexocad  28.0
PropertyGeometryList.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Core/Property.h>
4 
5 namespace Core
6 {
7 class Geometry;
8 
9 class LX_CORE_EXPORT PropertyGeometryList : public Core::Property
10 {
12 
13 public:
19 
25 
26  bool setValueFromVariant(const Core::Variant& value) override;
27  void copyValue(Core::Property* p) override;
28  Core::Variant getVariant(void) const override;
29  virtual bool isEqual(const Property*) const override;
30  virtual std::shared_ptr<Core::DbgInfo> getDbgInfo() const override;
31  virtual Core::Property* copy(void) const override;
32  virtual void paste(const Core::Property& from) override;
33 
34  bool setValue(const std::vector<Geom::Geometry*>&);
35 
40  bool setValues(const std::vector<Geom::Geometry*>&);
41  const std::vector<Geom::Geometry*>& getValue() const;
42 
47  const std::vector<Geom::Geometry*>& getValues() const;
48 
49  virtual void save(Base::AbstractWriter& writer, Base::PersistenceVersion& save_version);
50 
53 
54  virtual void setSize(int newSize);
55  virtual int getSize(void) const;
56 
59  void set1Value(int idx, std::unique_ptr<Geom::Geometry>&&);
61  bool setValues(const std::vector<Geom::Geometry*>&&);
62 
64  Geom::Geometry* operator[](const int idx) const { return mValueList[idx]; }
65 
66 private:
67  std::vector<Geom::Geometry*> mValueList;
68 };
69 
70 } // namespace Core
Property.h
Core::PropertyGeometryList::isEqual
virtual bool isEqual(const Property *) const override
compare properties
Core::PropertyGeometryList::restore
virtual void restore(Base::AbstractXMLReader &reader, Base::PersistenceVersion &version)
Throws Base::FileException.
Core::PropertyGeometryList::getDbgInfo
virtual std::shared_ptr< Core::DbgInfo > getDbgInfo() const override
Returns the debug information for this property.
Geom::Geometry
Definition: Geometry.h:73
Core::PropertyGeometryList::setValueFromVariant
bool setValueFromVariant(const Core::Variant &value) override
Core::PropertyGeometryList::setValues
bool setValues(const std::vector< Geom::Geometry * > &)
Core::PropertyGeometryList::getVariant
Core::Variant getVariant(void) const override
Core::PropertyGeometryList::set1Value
void set1Value(int idx, std::unique_ptr< Geom::Geometry > &&)
Core::PropertyGeometryList::copyValue
void copyValue(Core::Property *p) override
Base::PersistenceVersion
Definition: Persistence.h:13
Core::PropertyGeometryList::save
virtual void save(Base::AbstractWriter &writer, Base::PersistenceVersion &save_version)
This method is used to save properties or very small amounts of data to an XML document.
Core::PropertyGeometryList::getSize
virtual int getSize(void) const
Core
Definition: Base.h:5
Core::Variant
Definition: Variant.h:78
Core::PropertyGeometryList::paste
virtual void paste(const Core::Property &from) override
Paste the value from the property (mainly for Undo/Redo and transactions)
Core::PropertyGeometryList::operator[]
Geom::Geometry * operator[](const int idx) const
index operator
Definition: PropertyGeometryList.h:64
Base::AbstractWriter
Definition: Writer.h:13
Core::PropertyGeometryList::setSize
virtual void setSize(int newSize)
Core::PropertyGeometryList::setValue
bool setValue(const std::vector< Geom::Geometry * > &)
Base::AbstractXMLReader
Definition: AbstractXMLReader.h:7
Core::PropertyGeometryList::getValue
const std::vector< Geom::Geometry * > & getValue() const
Core::PropertyGeometryList::getValues
const std::vector< Geom::Geometry * > & getValues() const
Core::PropertyGeometryList::setSingleValue
bool setSingleValue(const Geom::Geometry *)
Core::PropertyGeometryList::~PropertyGeometryList
virtual ~PropertyGeometryList()
Core::version
LX_CORE_EXPORT Version & version
Core::Property
Definition: Property.h:72
Core::PropertyGeometryList::PropertyGeometryList
PropertyGeometryList()
Core::PropertyGeometryList::copy
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...
TYPESYSTEM_HEADER
#define TYPESYSTEM_HEADER()
define for subclassing Base::BaseClass
Definition: Base.h:12
Core::PropertyGeometryList::setValues
bool setValues(const std::vector< Geom::Geometry * > &&)
Core::PropertyGeometryList
Definition: PropertyGeometryList.h:10