|
|
|||
File indexing completed on 2026-10-31 09:37:51
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 //! Position of a Label 0029 class TDataXtd_Position : public TDF_Attribute 0030 { 0031 0032 public: 0033 //! Create if not found the TDataXtd_Position attribute set its position to <aPos> 0034 Standard_EXPORT static void Set(const TDF_Label& aLabel, const gp_Pnt& aPos); 0035 0036 //! Find an existing, or create an empty, Position. 0037 //! the Position attribute is returned. 0038 Standard_EXPORT static occ::handle<TDataXtd_Position> Set(const TDF_Label& aLabel); 0039 0040 //! Search label <aLabel) for the TDataXtd_Position attribute and get its position 0041 //! if found returns True 0042 Standard_EXPORT static bool Get(const TDF_Label& aLabel, gp_Pnt& aPos); 0043 0044 Standard_EXPORT TDataXtd_Position(); 0045 0046 //! Returns the ID of the attribute. 0047 Standard_EXPORT const Standard_GUID& ID() const override; 0048 0049 //! Returns the ID of the attribute. 0050 Standard_EXPORT static const Standard_GUID& GetID(); 0051 0052 //! Restores the contents from <anAttribute> into this 0053 //! one. It is used when aborting a transaction. 0054 Standard_EXPORT void Restore(const occ::handle<TDF_Attribute>& anAttribute) override; 0055 0056 //! Returns an new empty attribute from the good end 0057 //! type. It is used by the copy algorithm. 0058 Standard_EXPORT occ::handle<TDF_Attribute> NewEmpty() const override; 0059 0060 //! This method is different from the "Copy" one, 0061 //! because it is used when copying an attribute from 0062 //! a source structure into a target structure. This 0063 //! method pastes the current attribute to the label 0064 //! corresponding to the insertor. The pasted 0065 //! attribute may be a brand new one or a new version 0066 //! of the previous one. 0067 Standard_EXPORT void Paste( 0068 const occ::handle<TDF_Attribute>& intoAttribute, 0069 const occ::handle<TDF_RelocationTable>& aRelocTationable) const override; 0070 0071 Standard_EXPORT const gp_Pnt& GetPosition() const; 0072 0073 Standard_EXPORT void SetPosition(const gp_Pnt& aPos); 0074 0075 DEFINE_STANDARD_RTTIEXT(TDataXtd_Position, TDF_Attribute) 0076 0077 private: 0078 gp_Pnt myPosition; 0079 }; 0080 0081 #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 |
|