#include <hps.h>
Public Member Functions | |
Key () | |
Key (Key const &in_that) | |
Key (Control const &in_control) | |
Key (Key &&in_that) | |
Key & | operator= (Key &&in_that) |
virtual | ~Key () |
HPS::Type | ObjectType () const |
bool | HasOwner () const |
SegmentKey | Up () const |
SegmentKey | Owner () const |
void | Delete () |
void | MoveTo (SegmentKey const &in_new_owner) |
Key | CopyTo (SegmentKey const &in_destination) const |
Key & | operator= (Key const &in_that) |
virtual void | Assign (Key const &in_that) |
bool | Equals (Key const &in_that) const |
bool | operator!= (Key const &in_that) const |
bool | operator== (Key const &in_that) const |
size_t | GetHash () const |
![]() | |
Object & | operator= (Object const &other_object) |
Object (Object &&in_that) | |
Object & | operator= (Object &&in_that) |
HPS::Type | Type () const |
virtual bool | Empty () const |
virtual void | Reset () |
bool | HasType (HPS::Type in_mask) const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
The Key class is the common base class of all Visualize keys. Keys are handles to database objects and are the primary way of interacting with them (you would never modify a database object directly). The underlying mechanism is a smart pointer (assignment operator works like regular pointers). Attempting to use a deleted or otherwise invalid key will result in an InvalidObjectException.
HPS::Key::Key | ( | ) |
An uninitialized key refers to no database object and Type() will return Type::None.
HPS::Key::Key | ( | Key const & | in_that | ) |
Shares a reference to a database object referred to by in_that.
|
explicit |
Initializes a key tied to the Control in_control.
HPS::Key::Key | ( | Key && | in_that | ) |
|
virtual |
Releases a reference to this key, but it does not remove the key from the database.
|
virtual |
Share the smart-pointer.
Key HPS::Key::CopyTo | ( | SegmentKey const & | in_destination | ) | const |
Copies the database object referred to by this key into a segment pointed to by in_destination.
void HPS::Key::Delete | ( | ) |
Removes the database object referred to by this key.
bool HPS::Key::Equals | ( | Key const & | in_that | ) | const |
Determines whether the database objects pointed to by this key and in_that are the same. Empty keys (when key.Empty() returns true) are never equal to any key, even when the key is compared against itself (they act analogously to NaN comparisons in this case.)
size_t HPS::Key::GetHash | ( | ) | const |
Returns a hash code for the key.
bool HPS::Key::HasOwner | ( | ) | const |
void HPS::Key::MoveTo | ( | SegmentKey const & | in_new_owner | ) |
Moves the database object referred to by this key into a new containing segment pointed to by in_new_owner.
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
Reimplemented from HPS::Object.
Reimplemented in HPS::OffScreenWindowKey, HPS::PortfolioKey, HPS::ApplicationWindowKey, HPS::StandAloneWindowKey, HPS::ReferenceKey, HPS::StyleKey, HPS::IncludeKey, HPS::GridKey, HPS::PolygonKey, HPS::MeshKey, HPS::ShellKey, HPS::TextKey, HPS::EllipticalArcKey, HPS::EllipseKey, HPS::NURBSSurfaceKey, HPS::NURBSCurveKey, HPS::SpotlightKey, HPS::InfiniteLineKey, HPS::CuttingSectionKey, HPS::CircularWedgeKey, HPS::CircularArcKey, HPS::CircleKey, HPS::SphereKey, HPS::CylinderKey, HPS::DistantLightKey, HPS::MarkerKey, HPS::LineKey, HPS::GeometryKey, HPS::WindowKey, and HPS::SegmentKey.
bool HPS::Key::operator!= | ( | Key const & | in_that | ) | const |
Determines whether the database objects pointed to by this key and in_that are the same.
bool HPS::Key::operator== | ( | Key const & | in_that | ) | const |
Determines whether the database objects pointed to by this key and in_that are the same.
SegmentKey HPS::Key::Owner | ( | ) | const |
SegmentKey HPS::Key::Up | ( | ) | const |