Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-06 09:19:28

0001 // Copyright (c) 2020 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _Aspect_XRAction_HeaderFile
0015 #define _Aspect_XRAction_HeaderFile
0016 
0017 #include <Aspect_XRActionType.hxx>
0018 #include <NCollection_IndexedDataMap.hxx>
0019 #include <Standard_Transient.hxx>
0020 #include <Standard_Type.hxx>
0021 #include <TCollection_AsciiString.hxx>
0022 
0023 //! XR action definition.
0024 class Aspect_XRAction : public Standard_Transient
0025 {
0026   DEFINE_STANDARD_RTTIEXT(Aspect_XRAction, Standard_Transient)
0027 public:
0028   //! Return action id.
0029   const TCollection_AsciiString& Id() const { return myId; }
0030 
0031   //! Return action type.
0032   Aspect_XRActionType Type() const { return myType; }
0033 
0034   //! Return TRUE if action is defined.
0035   bool IsValid() const { return myRawHandle != 0; }
0036 
0037   //! Return action handle.
0038   uint64_t RawHandle() const { return myRawHandle; }
0039 
0040   //! Set action handle.
0041   void SetRawHandle(uint64_t theHande) { myRawHandle = theHande; }
0042 
0043   //! Main constructor.
0044   Aspect_XRAction(const TCollection_AsciiString& theId, const Aspect_XRActionType theType)
0045       : myId(theId),
0046         myRawHandle(0),
0047         myType(theType)
0048   {
0049   }
0050 
0051 protected:
0052   TCollection_AsciiString myId;        //!< action id
0053   uint64_t                myRawHandle; //!< action handle
0054   Aspect_XRActionType     myType;      //!< action type
0055 };
0056 
0057 //! Map of actions with action Id as a key.
0058 
0059 #endif // _Aspect_XRAction_HeaderFile