Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:59

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 
0029   //! Return action id.
0030   const TCollection_AsciiString& Id() const { return myId; }
0031 
0032   //! Return action type.
0033   Aspect_XRActionType Type() const { return myType; }
0034 
0035   //! Return TRUE if action is defined.
0036   bool IsValid() const { return myRawHandle != 0; }
0037 
0038   //! Return action handle.
0039   uint64_t RawHandle() const { return myRawHandle; }
0040 
0041   //! Set action handle.
0042   void SetRawHandle (uint64_t theHande) { myRawHandle = theHande; }
0043 
0044   //! Main constructor.
0045   Aspect_XRAction (const TCollection_AsciiString& theId,
0046                    const Aspect_XRActionType theType)
0047   : myId (theId), myRawHandle (0), myType (theType) {}
0048 
0049 protected:
0050   TCollection_AsciiString myId;        //!< action id
0051   uint64_t                myRawHandle; //!< action handle
0052   Aspect_XRActionType     myType;      //!< action type
0053 };
0054 
0055 //! Map of actions with action Id as a key.
0056 typedef NCollection_IndexedDataMap<TCollection_AsciiString, Handle(Aspect_XRAction)> Aspect_XRActionMap;
0057 
0058 #endif // _Aspect_XRAction_HeaderFile