19 #ifndef OTAWA_PROP_ABSTRACT_IDENTIFIER_H
20 #define OTAWA_PROP_ABSTRACT_IDENTIFIER_H
22 #include <elm/assert.h>
23 #include <elm/string.h>
25 #include <elm/util/VarArg.h>
43 inline const string name(
void)
const {
return nam; }
51 virtual const Type&
type(
void)
const;
79 {
id.print(out);
return out; }
81 { ASSERT(
id);
return out << *id; }
85 #endif // OTAWA_PROP_ABSTRACT_IDENTIFIER_H
virtual bool equals(const Property *prop1, const Property *prop2) const
Test if two properties are equal.
Definition: prop_AbstractIdentifier.cpp:317
const string name(void) const
Get the string name of the identifier.
Definition: AbstractIdentifier.h:43
void print(elm::io::Output &out) const
Print the identifier.
Definition: prop_AbstractIdentifier.cpp:168
AbstractIdentifier(void)
Build an anonymous identifier.
Definition: prop_AbstractIdentifier.cpp:103
elm::io::Output & operator<<(elm::io::Output &out, Address addr)
Definition: base.cpp:188
Represents a unique identifier used by the annotation system.
Definition: AbstractIdentifier.h:32
Base class of Otawa exceptions.
Definition: base.h:168
virtual void fromString(PropList &props, const string &str) const
Get value of an identifier from a string and store it in the given property list. ...
Definition: prop_AbstractIdentifier.cpp:229
virtual Property * unserialize(elm::serial2::Unserializer &unserializer)
Unserialize the workspace to the current unserializer.
Definition: prop_AbstractIdentifier.cpp:357
DuplicateIdentifierException(String &name)
Build a new exception.
Definition: prop_AbstractIdentifier.cpp:45
Property * copy(Property *prop) const
Definition: AbstractIdentifier.h:56
void print(elm::io::Output &output, const Property &prop) const
Definition: AbstractIdentifier.h:47
string nam
Definition: AbstractIdentifier.h:66
void initialize(void)
For internal use only.
Definition: prop_AbstractIdentifier.cpp:237
virtual ~AbstractIdentifier(void)
Definition: AbstractIdentifier.h:41
void printFormatted(elm::io::Output &output, const Property &prop) const
Definition: AbstractIdentifier.h:49
Definition: PropList.h:28
sys::SystemOutStream & out
virtual void serialize(Property *prop, elm::serial2::Serializer &serializer)
Serialize the workspace to the current serializer.
Definition: prop_AbstractIdentifier.cpp:346
This exception is thrown when two identifier with the same name are declared.
Definition: AbstractIdentifier.h:72
static AbstractIdentifier * find(const string &name)
Find an abstract identifier by its name.
Definition: prop_AbstractIdentifier.cpp:95
virtual Property * copy(Property &prop) const
Build a copy of the given property.
Definition: prop_AbstractIdentifier.cpp:327
cstring name
Definition: odisasm.cpp:107
This a list of properties.
Definition: PropList.h:63
void initProps(Property *prop, VarArg &args)
Add the properties found in the arguments (list of Property * ended by null) to the identifier proper...
Definition: prop_AbstractIdentifier.cpp:149
virtual const Type & type(void) const
Get the identifier of data linked with this property.
Definition: prop_AbstractIdentifier.cpp:218
virtual void printFormatted(io::Output &out, const Property *prop) const
Print the value of the given property in a formatted way, that is, possibly to perform re-scanning af...
Definition: prop_AbstractIdentifier.cpp:197
A property associates a data with an identifier.
Definition: PropList.h:42
This class describes the type of the data in the program.
Definition: type.h:39