Jpp
18.3.1
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JTools
JGarbageCollection.hh
Go to the documentation of this file.
1
#ifndef __JTOOLS__JGARBAGECOLLACTION__
2
#define __JTOOLS__JGARBAGECOLLACTION__
3
4
#include "
JTools/JMappableCollection.hh
"
5
6
7
/**
8
* \author mdejong
9
*/
10
11
namespace
JTOOLS {}
12
namespace
JPP {
using namespace
JTOOLS; }
13
14
namespace
JTOOLS {
15
16
/**
17
* Garbage collection.
18
*
19
* This class implements the JMappableCollection interface but does nothing.
20
*/
21
template
<
class
JKey_t,
class
JValue_t>
22
class
JGarbageCollection
:
23
public
JMappableCollection
<JKey_t, JValue_t>
24
{
25
public
:
26
27
typedef
JMappableCollection<JKey_t, JValue_t>
mappablecollection_type
;
28
29
typedef
typename
mappablecollection_type::key_type
key_type
;
30
typedef
typename
mappablecollection_type::mapped_type
mapped_type
;
31
32
33
/**
34
* Clear.
35
*/
36
virtual
void
clear
()
override
37
{}
38
39
40
/**
41
* Get mapped value.
42
*
43
* \param key key
44
* \return value
45
*/
46
virtual
const
mapped_type
&
get
(
typename
JLANG::JClass<key_type>::argument_type
key)
const
override
47
{
48
return
value
;
49
}
50
51
52
/**
53
* Get mapped value.
54
*
55
* \param key key
56
* \return value
57
*/
58
virtual
mapped_type
&
get
(
typename
JLANG::JClass<key_type>::argument_type
key)
override
59
{
60
return
value
;
61
}
62
63
private
:
64
mapped_type
value
;
65
};
66
}
67
68
#endif
JTOOLS::JGarbageCollection::key_type
mappablecollection_type::key_type key_type
Definition:
JGarbageCollection.hh:29
JTOOLS::JGarbageCollection::value
mapped_type value
Definition:
JGarbageCollection.hh:64
JTOOLS::JMappableCollection::key_type
JKey_t key_type
Definition:
JMappableCollection.hh:33
JTOOLS::JGarbageCollection::mapped_type
mappablecollection_type::mapped_type mapped_type
Definition:
JGarbageCollection.hh:30
JTOOLS::JMappableCollection
Template interface definition for associative collection of elements.
Definition:
JMappableCollection.hh:30
JTOOLS::JMappableCollection::mapped_type
JValue_t mapped_type
Definition:
JMappableCollection.hh:34
JTOOLS::JGarbageCollection
Garbage collection.
Definition:
JGarbageCollection.hh:22
JTOOLS::JGarbageCollection::clear
virtual void clear() override
Clear.
Definition:
JGarbageCollection.hh:36
JLANG::JClass::argument_type
JArgument< T >::argument_type argument_type
Definition:
JClass.hh:82
JTOOLS::JGarbageCollection::mappablecollection_type
JMappableCollection< JKey_t, JValue_t > mappablecollection_type
Definition:
JGarbageCollection.hh:27
JMappableCollection.hh
Generated by
1.8.5