1 #ifndef ROSE_Location_H
2 #define ROSE_Location_H
35 virtual std::string
toString()
const = 0;
42 virtual void print(std::ostream&)
const = 0;
69 return !(*
this == other);
74 virtual bool operator<(
const Location&)
const = 0;
75 virtual bool operator<=(
const Location&)
const = 0;
76 virtual bool operator>(
const Location&)
const = 0;
77 virtual bool operator>=(
const Location&)
const = 0;
85 virtual explicit operator bool()
const {
89 virtual explicit operator bool() const final {
93 virtual bool isValid()
const = 0;
105 return *
this ? false :
true;
110 inline std::ostream& operator<<(std::ostream &out,
const Location &x) {
virtual std::string toString() const =0
Convert location to string.
virtual bool operator!=(const Location &other) const final
Equality and inequality.
virtual void print(std::ostream &) const =0
Output location to a stream.
virtual bool operator!() const final
Test whether this object is empty.
virtual bool operator==(const Location &other) const final
Equality and inequality.
virtual bool isEqual(const Location &other) const =0
Equality and inequality.
Base class for location types.
virtual bool isEmpty() const final
Test whether this object is empty.
Main namespace for the ROSE library.
virtual bool isValid() const =0
Test whether this object is valid.
virtual std::string printableName() const =0
Convert location to escaped, parsable string.