Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:22

0001 // Created on: 2004-11-23
0002 // Created by: Pavel TELKOV
0003 // Copyright (c) 2004-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 // The original implementation Copyright: (C) RINA S.p.A
0017 
0018 #ifndef TObj_TXYZ_HeaderFile
0019 #define TObj_TXYZ_HeaderFile
0020 
0021 
0022 #include <gp_XYZ.hxx>
0023 #include <TDF_Attribute.hxx>
0024 
0025 
0026 class Standard_GUID;
0027 class TDF_Label;
0028 
0029 /*
0030 * Attribute for storing gp_XYZ
0031 */
0032 
0033 class TObj_TXYZ : public TDF_Attribute
0034 {
0035  public:
0036   //! Standard methods of OCAF attribute
0037 
0038   //! Empty constructor
0039   Standard_EXPORT TObj_TXYZ();
0040   
0041   //! This method is used in implementation of ID()
0042   static Standard_EXPORT const Standard_GUID& GetID();
0043   
0044   //! Returns the ID of TObj_TXYZ attribute.
0045   Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
0046   
0047  public:
0048   //! Method for create TObj_TXYZ object
0049   
0050   //! Creates attribute and sets the XYZ
0051   static Standard_EXPORT Handle(TObj_TXYZ) Set (const TDF_Label& theLabel,
0052                                                 const gp_XYZ&    theXYZ);
0053  public:
0054   //! Methods for setting and obtaining XYZ
0055   
0056   //! Sets the XYZ
0057   Standard_EXPORT void Set(const gp_XYZ& theXYZ);
0058   
0059   //! Returns the XYZ
0060   Standard_EXPORT gp_XYZ Get() const;
0061   
0062  public:
0063   //! Redefined OCAF abstract methods
0064     
0065   //! Returns an new empty TObj_TXYZ attribute. It is used by the
0066   //! copy algorithm.
0067   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
0068   
0069   //! Restores the backuped contents from <theWith> into this one. It is used 
0070   //! when aborting a transaction.
0071   Standard_EXPORT void Restore(const Handle(TDF_Attribute)& theWith) Standard_OVERRIDE;
0072   
0073   //! This method is used when copying an attribute from a source structure
0074   //! into a target structure.
0075   Standard_EXPORT void Paste(const Handle(TDF_Attribute)& theInto,
0076                              const Handle(TDF_RelocationTable)& theRT) const Standard_OVERRIDE;
0077 
0078   //! This method dumps the attribute value into the stream
0079   Standard_EXPORT virtual Standard_OStream& Dump(Standard_OStream& theOS) const Standard_OVERRIDE;
0080   
0081  private:
0082   //! Fields
0083   gp_XYZ myXYZ; //!< The object interface stored by the attribute
0084   
0085  public:
0086   //! CASCADE RTTI
0087   DEFINE_STANDARD_RTTIEXT(TObj_TXYZ,TDF_Attribute)
0088 };
0089 
0090 //! Define handle class for TObj_TXYZ
0091 DEFINE_STANDARD_HANDLE(TObj_TXYZ,TDF_Attribute)
0092 
0093 #endif
0094 
0095 #ifdef _MSC_VER
0096 #pragma once
0097 #endif