#include <memory>
#include <string>
-
-#include <boost/variant.hpp>
//--------------------------------------------------------------------------------------
class ModelAPI_Attribute;
class ModelAPI_AttributeRefAttr;
+class ModelAPI_AttributeRefAttrList;
class ModelAPI_Object;
+class ModelHighAPI_Interface;
//--------------------------------------------------------------------------------------
/**\class ModelHighAPI_RefAttr
* \ingroup CPPHighAPI
ModelHighAPI_RefAttr();
/// Constructor for attribute
MODELHIGHAPI_EXPORT
- explicit ModelHighAPI_RefAttr(const std::shared_ptr<ModelAPI_Attribute> & theValue);
+ ModelHighAPI_RefAttr(const std::shared_ptr<ModelAPI_Attribute> & theValue);
/// Constructor for object
MODELHIGHAPI_EXPORT
- explicit ModelHighAPI_RefAttr(const std::shared_ptr<ModelAPI_Object> & theValue);
+ ModelHighAPI_RefAttr(const std::shared_ptr<ModelAPI_Object> & theValue);
+ /// Constructor for Interface (use result() for object)
+ MODELHIGHAPI_EXPORT
+ ModelHighAPI_RefAttr(const std::shared_ptr<ModelHighAPI_Interface> & theValue);
/// Destructor
MODELHIGHAPI_EXPORT
virtual ~ModelHighAPI_RefAttr();
MODELHIGHAPI_EXPORT
virtual void fillAttribute(const std::shared_ptr<ModelAPI_AttributeRefAttr> & theAttribute) const;
+ /// Append to list attribute
+ MODELHIGHAPI_EXPORT
+ virtual void appendToList(const std::shared_ptr<ModelAPI_AttributeRefAttrList> & theAttribute) const;
+
private:
- boost::variant<
- std::shared_ptr<ModelAPI_Attribute>,
- std::shared_ptr<ModelAPI_Object>
- > myValue;
+ enum VariantType { VT_ATTRIBUTE, VT_OBJECT } myVariantType;
+ std::shared_ptr<ModelAPI_Attribute> myAttribute;
+ std::shared_ptr<ModelAPI_Object> myObject;
};
//--------------------------------------------------------------------------------------