#include <hps.h>

Public Member Functions | |
virtual void | Assign (Key const &in_that) |
Key | CopyTo (SegmentKey const &in_destination) const |
void | Delete () |
bool | Equals (Key const &in_that) const |
size_t | GetHash () const |
bool | HasOwner () const |
Key () | |
Key (Key const &in_that) | |
Key (Control const &in_control) | |
Key (Key &&in_that) | |
void | MoveTo (SegmentKey const &in_new_owner) |
HPS::Type | ObjectType () const |
bool | operator!= (Key const &in_that) const |
Key & | operator= (Key &&in_that) |
Key & | operator= (Key const &in_that) |
bool | operator== (Key const &in_that) const |
SegmentKey | Owner () const |
SegmentKey | Up () const |
virtual | ~Key () |
![]() | |
virtual bool | Empty () const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
bool | HasType (HPS::Type in_mask) const |
Object (Object const &that) | |
Object (Object &&in_that) | |
Object & | operator= (Object const &other_object) |
Object & | operator= (Object &&in_that) |
virtual void | Reset () |
HPS::Type | Type () const |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
Detailed Description
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.
Constructor & Destructor Documentation
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.
Member Function Documentation
|
virtual |
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.
- Returns
- The key of the new copy.
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.
- Returns
- The size_t hash code.
bool HPS::Key::HasOwner | ( | ) | const |
- Returns
- Indicates whether this key has an owner or not.
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.
- Returns
- The declared type of the object in question, which may differ from the true, underlying type.
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 |
- Returns
- The segment containing this key.
SegmentKey HPS::Key::Up | ( | ) | const |
- Returns
- The segment containing this key.
The documentation for this class was generated from the following file:
- include/hps.h