20 #ifndef HURRICANE_LOCATOR
21 #define HURRICANE_LOCATOR
23 #include "hurricane/Commons.h"
90 public:
virtual string _getTypeName() const
93 return _TName(
"Locator");
96 public:
virtual string _getString() const
100 return "<" + _getTypeName() +
" invalid>";
102 return "<" + _getTypeName() +
" " + getString(
getElement()) +
">";
139 _locator(locator.getClone())
146 _locator(genericLocator.getClone())
165 if (_locator)
delete _locator;
171 public: GenericLocator& operator=(
const Locator<Type>& locator)
174 if (_locator)
delete _locator;
179 public: GenericLocator& operator=(
const GenericLocator& genericLocator)
182 if (_locator)
delete _locator;
183 _locator = genericLocator.
getClone();
187 public: GenericLocator& operator=(Locator<Type>* locator)
192 if (_locator)
delete _locator;
200 public:
virtual Type getElement() const
203 return ((_locator) ? _locator->
getElement() : Type());
206 public:
virtual Locator<Type>* getClone() const
209 return ((_locator) ? _locator->
getClone() : NULL);
212 public:
virtual Locator<Type>* getLocator()
215 return ( _locator->getLocator () );
222 public:
virtual bool isValid() const
225 return (_locator && _locator->
isValid());
231 public:
virtual void progress()
240 public:
virtual string _getTypeName() const
243 return _TName(
"GenericLocator");
246 public:
virtual string _getString() const
250 return "<" + _getTypeName() +
" unbound>";
252 return "<" + _getTypeName() +
" " + getString(_locator) +
">";
Generic Locator auto-pointer.
Definition: Locator.h:113
GenericLocator(Locator< Type > *locator)
Definition: Locator.h:150
GenericLocator(const Locator< Type > &locator)
Definition: Locator.h:136
GenericLocator(const GenericLocator &genericLocator)
Definition: Locator.h:143
Locator description (API)
Definition: Locator.h:33
virtual Locator< Type > * getClone() const =0
virtual Type getElement() const =0
virtual bool isValid() const =0
virtual void progress()=0
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5