|
|
|||
File indexing completed on 2026-05-04 08:46:30
0001 // Created on: 2009-04-06 0002 // Created by: Sergey ZARITCHNY 0003 // Copyright (c) 2009-2014 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef _TDataXtd_Position_HeaderFile 0017 #define _TDataXtd_Position_HeaderFile 0018 0019 #include <Standard.hxx> 0020 #include <Standard_Type.hxx> 0021 0022 #include <gp_Pnt.hxx> 0023 #include <TDF_Attribute.hxx> 0024 class TDF_Label; 0025 class Standard_GUID; 0026 class TDF_RelocationTable; 0027 0028 class TDataXtd_Position; 0029 DEFINE_STANDARD_HANDLE(TDataXtd_Position, TDF_Attribute) 0030 0031 //! Position of a Label 0032 class TDataXtd_Position : public TDF_Attribute 0033 { 0034 0035 public: 0036 //! Create if not found the TDataXtd_Position attribute set its position to <aPos> 0037 Standard_EXPORT static void Set(const TDF_Label& aLabel, const gp_Pnt& aPos); 0038 0039 //! Find an existing, or create an empty, Position. 0040 //! the Position attribute is returned. 0041 Standard_EXPORT static Handle(TDataXtd_Position) Set(const TDF_Label& aLabel); 0042 0043 //! Search label <aLabel) for the TDataXtd_Position attribute and get its position 0044 //! if found returns True 0045 Standard_EXPORT static Standard_Boolean Get(const TDF_Label& aLabel, gp_Pnt& aPos); 0046 0047 Standard_EXPORT TDataXtd_Position(); 0048 0049 //! Returns the ID of the attribute. 0050 Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE; 0051 0052 //! Returns the ID of the attribute. 0053 Standard_EXPORT static const Standard_GUID& GetID(); 0054 0055 //! Restores the contents from <anAttribute> into this 0056 //! one. It is used when aborting a transaction. 0057 Standard_EXPORT virtual void Restore(const Handle(TDF_Attribute)& anAttribute) Standard_OVERRIDE; 0058 0059 //! Returns an new empty attribute from the good end 0060 //! type. It is used by the copy algorithm. 0061 Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; 0062 0063 //! This method is different from the "Copy" one, 0064 //! because it is used when copying an attribute from 0065 //! a source structure into a target structure. This 0066 //! method pastes the current attribute to the label 0067 //! corresponding to the insertor. The pasted 0068 //! attribute may be a brand new one or a new version 0069 //! of the previous one. 0070 Standard_EXPORT virtual void Paste(const Handle(TDF_Attribute)& intoAttribute, 0071 const Handle(TDF_RelocationTable)& aRelocTationable) const 0072 Standard_OVERRIDE; 0073 0074 Standard_EXPORT const gp_Pnt& GetPosition() const; 0075 0076 Standard_EXPORT void SetPosition(const gp_Pnt& aPos); 0077 0078 DEFINE_STANDARD_RTTIEXT(TDataXtd_Position, TDF_Attribute) 0079 0080 protected: 0081 private: 0082 gp_Pnt myPosition; 0083 }; 0084 0085 #endif // _TDataXtd_Position_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|