Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-12 09:18:01

0001 // Created on: 1994-11-04
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1994-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _MoniTool_TransientElem_HeaderFile
0018 #define _MoniTool_TransientElem_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <MoniTool_Element.hxx>
0024 #include <Standard_CString.hxx>
0025 
0026 //! an TransientElem defines an Element for a specific input class
0027 //! its definition includes the value of the Key to be mapped,
0028 //! and the HashCoder associated to the class of the Key
0029 //!
0030 //! Transient from Standard defines the class to be keyed
0031 //! MapTransientHasher from TColStd is the associated Hasher
0032 //! DataInfo from MoniTool is an additional class which helps to provide
0033 //! information on the value (template : see DataInfo)
0034 class MoniTool_TransientElem : public MoniTool_Element
0035 {
0036 
0037 public:
0038   //! Creates a TransientElem with a Value. This Value can then not be
0039   //! changed. It is used by the Hasher to compute the HashCode,
0040   //! which will then be stored for an immediate reading.
0041   Standard_EXPORT MoniTool_TransientElem(const occ::handle<Standard_Transient>& akey);
0042 
0043   //! Returns the contained value
0044   Standard_EXPORT const occ::handle<Standard_Transient>& Value() const;
0045 
0046   //! Specific testof equality : defined as False if <other> has
0047   //! not the same true Type, else contents are compared (by
0048   //! C++ operator ==)
0049   Standard_EXPORT bool Equates(const occ::handle<MoniTool_Element>& other) const override;
0050 
0051   //! Returns the Type of the Value. By default, returns the
0052   //! DynamicType of <me>, but can be redefined
0053   Standard_EXPORT occ::handle<Standard_Type> ValueType() const override;
0054 
0055   //! Returns the name of the Type of the Value. Default is name
0056   //! of ValueType, unless it is for a non-handled object
0057   Standard_EXPORT const char* ValueTypeName() const override;
0058 
0059   DEFINE_STANDARD_RTTIEXT(MoniTool_TransientElem, MoniTool_Element)
0060 
0061 private:
0062   occ::handle<Standard_Transient> theval;
0063 };
0064 
0065 #endif // _MoniTool_TransientElem_HeaderFile