File: MoniTool_Element.hxx

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (87 lines) | stat: -rw-r--r-- 2,501 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _MoniTool_Element_HeaderFile
#define _MoniTool_Element_HeaderFile

#include <Standard.hxx>
#include <Standard_DefineHandle.hxx>
#include <Handle_MoniTool_Element.hxx>

#include <Standard_Integer.hxx>
#include <MoniTool_AttrList.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_Boolean.hxx>
#include <Handle_Standard_Type.hxx>
#include <Standard_CString.hxx>
class Standard_Type;
class MoniTool_AttrList;


//! a Element allows to map any kind of object as a Key for a Map.
//! This works by defining, for a Hash Code, that of the real Key,
//! not of the Element which acts only as an intermediate.
//! When a Map asks for the HashCode of a Element, this one returns
//! the code it has determined at creation time
class MoniTool_Element : public MMgt_TShared
{

public:

  
  //! Returns the HashCode which has been stored by SetHashCode
  //! (remark that HashCode could be deferred then be defined by
  //! sub-classes, the result is the same)
  Standard_EXPORT   Standard_Integer GetHashCode()  const;
  
  //! Specific testof equallity : to be defined by each sub-class,
  //! must be False if Elements have not the same true Type, else
  //! their contents must be compared
  Standard_EXPORT virtual   Standard_Boolean Equates (const Handle(MoniTool_Element)& other)  const = 0;
  
  //! Returns the Type of the Value. By default, returns the
  //! DynamicType of <me>, but can be redefined
  Standard_EXPORT virtual   Handle(Standard_Type) ValueType()  const;
  
  //! Returns the name of the Type of the Value. Default is name
  //! of ValueType, unless it is for a non-handled object
  Standard_EXPORT virtual   Standard_CString ValueTypeName()  const;
  
  //! Returns (readonly) the Attribute List
  Standard_EXPORT  const  MoniTool_AttrList& ListAttr()  const;
  
  //! Returns (modifiable) the Attribute List
  Standard_EXPORT   MoniTool_AttrList& ChangeAttr() ;




  DEFINE_STANDARD_RTTI(MoniTool_Element)

protected:

  
  //! Stores the HashCode which corresponds to the Value given to
  //! create the Mapper
  Standard_EXPORT   void SetHashCode (const Standard_Integer code) ;



private: 


  Standard_Integer thecode;
  MoniTool_AttrList theattrib;


};







#endif // _MoniTool_Element_HeaderFile