Jpp  15.0.3
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JGarbageCollection.hh
Go to the documentation of this file.
1 #ifndef __JTOOLS__JGARBAGECOLLACTION__
2 #define __JTOOLS__JGARBAGECOLLACTION__
3 
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>
23  public JMappableCollection<JKey_t, JValue_t>
24  {
25  public:
26 
28 
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:
65  };
66 }
67 
68 #endif
mappablecollection_type::key_type key_type
mappablecollection_type::mapped_type mapped_type
Template interface definition for associative collection of elements.
virtual void clear() override
Clear.
JArgument< T >::argument_type argument_type
Definition: JClass.hh:82
JMappableCollection< JKey_t, JValue_t > mappablecollection_type