Rocket::Core::ElementReference Class Reference

#include <ElementReference.h>

Collaboration diagram for Rocket::Core::ElementReference:

Public Member Functions

 ElementReference (Element *element=NULL)
 ElementReference (const ElementReference &copy)
 operator bool () const
ElementReferenceoperator= (Element *element)
ElementReferenceoperator= (const ElementReference &element_reference)
Elementoperator* ()
Elementoperator-> ()
bool operator== (const ElementReference &rhs) const
bool operator== (const Element *rhs) const
bool operator< (const ElementReference &rhs) const
bool operator!= (const ElementReference &rhs) const
bool operator!= (const Element *rhs) const

Detailed Description

A smart pointer for RKTElements.

Author:
Peter Curry

Member Function Documentation

Rocket::Core::ElementReference::operator bool (  )  const

Returns true if this reference is bound to an element.

Returns:
True if this reference points to a non-NULL element, false otherwise.

ElementReference & Rocket::Core::ElementReference::operator= ( Element element  ) 

Assigns a new element for this reference to point to.

Parameters:
element[in] The new element.
Returns:
This element reference.

ElementReference & Rocket::Core::ElementReference::operator= ( const ElementReference element_reference  ) 

Assigns a new element for this reference, from another reference.

Parameters:
element_reference[in] The element reference to copy.
Returns:
This element reference.

Element * Rocket::Core::ElementReference::operator* (  ) 

Returns a reference to the underlying element.

Returns:
The underlying element. This may be NULL.

Element * Rocket::Core::ElementReference::operator-> (  ) 

Returns a reference to the underlying element.

Returns:
The underlying element. This may be NULL.

bool Rocket::Core::ElementReference::operator== ( const ElementReference rhs  )  const

Equality operator for the reference. Used for STL containers.

Parameters:
rhs[in] The other element to use in the comparison.
Returns:
True if the elements are equivalent, false otherwise.

bool Rocket::Core::ElementReference::operator== ( const Element rhs  )  const

Equality operator for the reference.

Parameters:
rhs[in] The other element to use in the comparison.
Returns:
True if the elements are equivalent, false otherwise.

bool Rocket::Core::ElementReference::operator< ( const ElementReference rhs  )  const

Less-than operator for the reference. Used for STL containers.

Parameters:
rhs[in] The other element to use in the comparison.
Returns:
True if this element is less than the other element, false otherwise.

bool Rocket::Core::ElementReference::operator!= ( const ElementReference rhs  )  const

Inequality operator for the reference.

Parameters:
rhs[in] The other element to use in the comparison.
Returns:
False if the elements are equivalent, true otherwise.

bool Rocket::Core::ElementReference::operator!= ( const Element rhs  )  const

Inequality operator for the reference.

Parameters:
rhs[in] A raw element to use in the comparison.
Returns:
False if the elements are equivalent, true otherwise.


The documentation for this class was generated from the following files: