Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-14 08:29:23

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 class MoniTool_TransientElem;
0027 DEFINE_STANDARD_HANDLE(MoniTool_TransientElem, MoniTool_Element)
0028 
0029 //! an TransientElem defines an Element for a specific input class
0030 //! its definition includes the value of the Key to be mapped,
0031 //! and the HashCoder associated to the class of the Key
0032 //!
0033 //! Transient from Standard defines the class to be keyed
0034 //! MapTransientHasher from TColStd is the associated Hasher
0035 //! DataInfo from MoniTool   is an additional class which helps to provide
0036 //! information on the value (template : see DataInfo)
0037 class MoniTool_TransientElem : public MoniTool_Element
0038 {
0039 
0040 public:
0041   //! Creates a TransientElem with a Value. This Value can then not be
0042   //! changed. It is used by the Hasher to compute the HashCode,
0043   //! which will then be stored for an immediate reading.
0044   Standard_EXPORT MoniTool_TransientElem(const Handle(Standard_Transient)& akey);
0045 
0046   //! Returns the contained value
0047   Standard_EXPORT const Handle(Standard_Transient)& Value() const;
0048 
0049   //! Specific testof equality : defined as False if <other> has
0050   //! not the same true Type, else contents are compared (by
0051   //! C++ operator ==)
0052   Standard_EXPORT Standard_Boolean
0053     Equates(const Handle(MoniTool_Element)& other) const Standard_OVERRIDE;
0054 
0055   //! Returns the Type of the Value. By default, returns the
0056   //! DynamicType of <me>, but can be redefined
0057   Standard_EXPORT virtual Handle(Standard_Type) ValueType() const Standard_OVERRIDE;
0058 
0059   //! Returns the name of the Type of the Value. Default is name
0060   //! of ValueType, unless it is for a non-handled object
0061   Standard_EXPORT virtual Standard_CString ValueTypeName() const Standard_OVERRIDE;
0062 
0063   DEFINE_STANDARD_RTTIEXT(MoniTool_TransientElem, MoniTool_Element)
0064 
0065 protected:
0066 private:
0067   Handle(Standard_Transient) theval;
0068 };
0069 
0070 #endif // _MoniTool_TransientElem_HeaderFile