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_XRActionSet_HeaderFile
0015 #define _Aspect_XRActionSet_HeaderFile
0016 
0017 #include <Aspect_XRAction.hxx>
0018 
0019 //! XR action set.
0020 class Aspect_XRActionSet : public Standard_Transient
0021 {
0022   DEFINE_STANDARD_RTTIEXT(Aspect_XRActionSet, Standard_Transient)
0023 public:
0024 
0025   //! Return action id.
0026   const TCollection_AsciiString& Id() const { return myId; }
0027 
0028   //! Return action handle.
0029   uint64_t RawHandle() const { return myRawHandle; }
0030 
0031   //! Set action handle.
0032   void SetRawHandle (uint64_t theHande) { myRawHandle = theHande; }
0033 
0034   //! Add action.
0035   void AddAction (const Handle(Aspect_XRAction)& theAction)
0036   {
0037     myActions.Add (theAction->Id(), theAction);
0038   }
0039 
0040   //! Return map of actions.
0041   const Aspect_XRActionMap& Actions() const { return myActions; }
0042 
0043   //! Main constructor.
0044   Aspect_XRActionSet (const TCollection_AsciiString& theId)
0045   : myId (theId), myRawHandle (0) {}
0046 
0047 protected:
0048   TCollection_AsciiString myId;        //!< action set id
0049   uint64_t                myRawHandle; //!< action set handle
0050   Aspect_XRActionMap      myActions;   //!< map of actions
0051 };
0052 
0053 typedef NCollection_IndexedDataMap<TCollection_AsciiString, Handle(Aspect_XRActionSet)> Aspect_XRActionSetMap;
0054 
0055 #endif // _Aspect_XRActionSet_HeaderFile