ShapeElement

class HPS::ShapeElement : public HPS::Object

The ShapeElement class is a user space object. It is the base class for all shape elements.

Subclassed by HPS::AnchorShapeElement, HPS::CircleShapeElement, HPS::CircularArcShapeElement, HPS::EllipseShapeElement, HPS::EllipticalArcShapeElement, HPS::LeaderLineClippingElement, HPS::LineShapeElement, HPS::PolygonShapeElement

Public Functions

bool Equals(ShapeElement const &in_that) const

Check if the source ShapeElement is equivalent to this ShapeElement.

Parameters

in_that – The source ShapeElement to compare to this ShapeElement.

Returns

true if the objects are equivalent, false otherwise.

inline virtual HPS::Type ObjectType() const

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Returns

The declared type of the object in question, which may differ from the true, underlying type.

bool operator!=(ShapeElement const &in_that) const

Check if the source ShapeElement is not equivalent to this ShapeElement.

Parameters

in_that – The source ShapeElement to compare to this ShapeElement.

Returns

true if the objects are not equivalent, false otherwise.

ShapeElement &operator=(ShapeElement &&in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this ShapeElement thereby avoiding a copy.

Parameters

in_that – An rvalue reference to a ShapeElement to take the impl from.

Returns

A reference to this ShapeElement.

ShapeElement &operator=(ShapeElement const &in_that)

Copies the source ShapeElement into this ShapeElement.

Parameters

in_that – The source ShapeElement to copy.

Returns

A reference to this ShapeElement.

bool operator==(ShapeElement const &in_that) const

Check if the source ShapeElement is equivalent to this ShapeElement.

Parameters

in_that – The source ShapeElement to compare to this ShapeElement.

Returns

true if the objects are equivalent, false otherwise.

void Set(ShapeElement const &in_that)

Copies the source ShapeElement into this ShapeElement.

Parameters

in_that – The source ShapeElement to copy.

ShapeElement &SetDisjointed(bool in_state)

Sets the disjointed state for this ShapeElement. Two shape elements of the same type are automatically joined together if they appear consecutively in the shape element array. LineShapeElement objects are always disjointed.

Parameters

in_state – The disjointed state for this ShapeElement.

ShapeElement &SetFill(bool in_state)

Sets the fill mode for this ShapeElement. All shape elements default to being filled, except for Lines which cannot be filled.

Parameters

in_state – The fill mode for this ShapeElement.

ShapeElement()

The default constructor creates an empty ShapeElement object.

ShapeElement(ShapeElement &&in_that)

The move constructor creates a ShapeElement by transferring the underlying impl of the rvalue reference to this ShapeElement thereby avoiding a copy and allocation.

Parameters

in_that – An rvalue reference to a ShapeElement to take the impl from.

ShapeElement(ShapeElement const &in_that)

The copy constructor creates a new ShapeElement object that contains the same settings as the source ShapeElement.

Parameters

in_that – The source ShapeElement to copy.

bool ShowDisjointed(bool &out_state) const

Shows the disjointed state for this ShapeElement. Two shape elements of the same type are automatically joined together if they appear consecutively in the shape element array. LineShapeElement objects are always disjointed.

Parameters

out_state – Whether this shape element will be disjointed from the previous one.

Returns

true if a disjointed state was set, false otherwise.

bool ShowFill(bool &out_state) const

Shows the fill mode for this ShapeElement. All shape elements default to being filled, except for Lines which cannot be filled.

Parameters

out_state – Whether faces are drawn for this shape element.

Returns

true if a fill mode was set, false otherwise.

virtual ~ShapeElement()

Public Static Attributes

static const HPS::Type staticType = HPS::Type::ShapeElement