SHAPER 9.16.0
ModelHighAPI_Reference.h
1// Copyright (C) 2014-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_REFERENCE_H_
21#define SRC_MODELHIGHAPI_MODELHIGHAPI_REFERENCE_H_
22
23//--------------------------------------------------------------------------------------
24#include "ModelHighAPI.h"
25
26#include <memory>
27#include <string>
28//--------------------------------------------------------------------------------------
33class ModelAPI_Object;
35//--------------------------------------------------------------------------------------
41{
42public:
44 MODELHIGHAPI_EXPORT
47 MODELHIGHAPI_EXPORT
48 ModelHighAPI_Reference(const std::shared_ptr<ModelAPI_Object> & theValue);
50 MODELHIGHAPI_EXPORT
51 ModelHighAPI_Reference(const std::shared_ptr<ModelHighAPI_Interface> & theValue);
53 MODELHIGHAPI_EXPORT
55
57 MODELHIGHAPI_EXPORT virtual
58 void fillAttribute(const std::shared_ptr<ModelAPI_AttributeReference> & theAttribute) const;
59
61 MODELHIGHAPI_EXPORT
62 virtual void appendToList(const std::shared_ptr<ModelAPI_AttributeRefList> & theAttribute) const;
63
65 MODELHIGHAPI_EXPORT
66 virtual std::shared_ptr<ModelAPI_Feature> feature() const;
67
68private:
69 std::shared_ptr<ModelAPI_Object> myObject;
70};
71
72//--------------------------------------------------------------------------------------
73//--------------------------------------------------------------------------------------
74#endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_REFATTR_H_ */
Attribute that contains list of references to features (located in the same document).
Definition: ModelAPI_AttributeRefList.h:33
Attribute that contains reference to feature (located in the same document).
Definition: ModelAPI_AttributeReference.h:32
Generic attribute of the Object.
Definition: ModelAPI_Attribute.h:34
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:41
Represents any object in the data model and in the object browser.
Definition: ModelAPI_Object.h:45
Base class for feature interfaces.
Definition: ModelHighAPI_Interface.h:46
Class for filling ModelAPI_AttributeReference.
Definition: ModelHighAPI_Reference.h:41
virtual std::shared_ptr< ModelAPI_Feature > feature() const
Returns feature for this object.
Definition: ModelHighAPI_Reference.cpp:71
virtual void fillAttribute(const std::shared_ptr< ModelAPI_AttributeReference > &theAttribute) const
Fill attribute values.
Definition: ModelHighAPI_Reference.cpp:57
ModelHighAPI_Reference()
Default constructor.
Definition: ModelHighAPI_Reference.cpp:28
virtual void appendToList(const std::shared_ptr< ModelAPI_AttributeRefList > &theAttribute) const
Append to list attribute.
Definition: ModelHighAPI_Reference.cpp:64
virtual ~ModelHighAPI_Reference()
Destructor.
Definition: ModelHighAPI_Reference.cpp:52