class HPS::Object

The Object class is the common base class of most Visualize classes.

Subclassed by HPS::ConditionalExpression, HPS::Control, HPS::Definition, HPS::DriverEventHandler, HPS::EventDispatcher, HPS::EventHandler, HPS::EventNotifier, HPS::FontInfoState, HPS::FontSearchResults, HPS::FontSearchResultsIterator, HPS::GlyphElement, HPS::HighlightSearchResults, HPS::HighlightSearchResultsIterator, HPS::HighlightState, HPS::IONotifier, HPS::Key, HPS::KeyPath, HPS::KeyboardState, HPS::Kit, HPS::LinePatternElement, HPS::MouseState, HPS::OptimizeMappingResults, HPS::OptimizeMappingResultsIterator, HPS::SearchResults, HPS::SearchResultsIterator, HPS::SelectionItem, HPS::SelectionResults, HPS::SelectionResultsIterator, HPS::ShapeElement, HPS::Sprocket, HPS::Stream::Toolkit, HPS::TouchState, HPS::TreeContext, HPS::TrimElement, HPS::UpdateNotifier, HPS::World

Public Functions

inline virtual bool Empty() const

Indicates whether this object has any values set on it.




An empty object is not necessarily invalid. For example, all fresh new Kits, or Objects that have been reset, are both valid and empty.


true if no values are set on this object, false otherwise.

intptr_t GetClassID() const

Returns a unique identifier that is shared by all objects of the same class.


A unique value shared by all objects of the same class.

intptr_t GetInstanceID() const

Returns the object’s database handle, which can be used to determine which instance of a class the object is. For example, controls are simply aliases for segment keys that group related functions. Therefore, a SegmentKey and all of its controls would return the same instance id. Different keys and controls will return the same value if they are backed by the same database resource.


A value unique to an instance of an object and all objects that are backed by the same database resource. This means it would be 4 bytes on a 32-bit system and 8 bytes on a 64-bit system.

bool HasType(HPS::Type in_mask) const

This function indicates whether this Object has the given Type mask.


This function must synchronize the database (by waiting for all pending database operations to complete) in order to know the type status of this object with certainty. Therefore this function can negatively impact performance. You should vigorously avoid using this function in high-traffic or peformance-critical areas of your code.


in_mask – The Type mask to check against this Object.


true if this Object has the given Type mask, false otherwise.

Object(Object &&in_that)

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


in_that – An rvalue reference to an Object to take the impl from.

Object(Object const &that)
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).


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

Object &operator=(Object &&in_that)

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


in_that – An rvalue reference to an Object to take the impl from.


A reference to this Object.

Object &operator=(Object const &other_object)
virtual void Reset()

Resets this object to its initial, uninitialized state.

virtual ~Object()

Public Static Functions

template<typename T>
static inline intptr_t ClassID()

Unique identifier for this class. Note: this method uses construction of static objects. If used in a constructor, it should be used in the body not the initializer list.

Public Static Attributes

static const HPS::Type staticType = HPS::Type::None

Returned by ObjectType()