Otawa  0.10
DeletableProperty.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * Copyright (c) 2005, IRIT UPS.
4  *
5  * otawa/prop/DeletableProperty.h -- DeletableProperty class interface.
6  */
7 #ifndef OTAWA_PROP_DELETABLE_PROPERTY_H
8 #define OTAWA_PROP_DELETABLE_PROPERTY_H
9 
10 #include <elm/string.h>
11 #include <otawa/prop/Property.h>
12 
13 namespace otawa {
14 
15 // DeletableProperty class
16 template <class T>
18 public:
19 protected:
20  virtual ~DeletableProperty(void);
21  //virtual Property *copy(void);
22 public:
23  inline DeletableProperty(const AbstractIdentifier *id, T value);
24  inline DeletableProperty(const AbstractIdentifier& id, T value);
25  inline DeletableProperty(elm::CString name, T value);
26 };
27 
28 
29 // Inlines
30 template <class T>
33 }
34 
35 /*template <class T>
36 Property *DeletableProperty<T>::copy(void) {
37  return new GenericProperty<T>::copy();
38 }*/
39 
40 template <class T>
42 : GenericProperty<T>(id, value) {
43 }
44 
45 template <class T>
47 : GenericProperty<T>(id, value) {
48 }
49 
50 template <class T>
52 : GenericProperty<T>(name, value) {
53 }
54 
55 } // otawa
56 
57 #endif // OTAWA_PROP_DELETABLE_PROPERTY_H
This generic class allows attaching any type of data to a property.
Definition: Property.h:20
Represents a unique identifier used by the annotation system.
Definition: AbstractIdentifier.h:32
virtual ~DeletableProperty(void)
Delete also its value.
Definition: DeletableProperty.h:31
cstring name
Definition: odisasm.cpp:107
const T & value(void) const
Get the value of the property.
Definition: Property.h:33
A deletable property is a genericproperty whose value will be deleted when the property is destroyed...
Definition: DeletableProperty.h:17
DeletableProperty(const AbstractIdentifier *id, T value)
Definition: DeletableProperty.h:41