1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef DFATTRIBUTE_HXX
23 #define DFATTRIBUTE_HXX
25 #include "DF_definitions.hxx"
31 //Class DF_Attribute is used to store some data defined by the DF_Attribute type
38 Standard_EXPORT DF_Attribute();
40 Standard_EXPORT virtual ~DF_Attribute();
42 //Returns a Label on which this Attribute is located.
43 Standard_EXPORT DF_Label Label() const;
45 //Searches an Attribute with given ID located on the same Label as this Attribute.
46 Standard_EXPORT DF_Attribute* FindAttribute(const std::string& theID) const;
49 Standard_EXPORT virtual std::string Save() { return ""; }
50 Standard_EXPORT virtual void Load(const std::string&) {}
52 //######## Virtual methods that must be redefined in descendants of the DF_Attribute
54 //This method must be redefined in all descendents of the DF_Attribute
55 //ID is a std::string that uniquely identify the given type of Attributes within the Application.
56 Standard_EXPORT virtual const std::string& ID() const = 0;
58 //Restores a content of this Attribute from another Attribute
59 Standard_EXPORT virtual void Restore(DF_Attribute* theAttribute) = 0;
61 //Creates a new empty copy oà this Attribute
62 Standard_EXPORT virtual DF_Attribute* NewEmpty() const = 0;
64 //Pastes a content of this Attribute into another Attribute
65 Standard_EXPORT virtual void Paste(DF_Attribute* theIntoAttribute) = 0;
70 Standard_EXPORT virtual void AfterAddition() {}
71 Standard_EXPORT virtual void BeforeForget() {}
77 friend class DF_Label;