< Home

< Table of Contents

REFERENCE MANUAL

Key Class Reference

#include <hps.h>

Inheritance diagram for Key:
Object GeometryKey IncludeKey PortfolioKey SegmentKey StyleKey CircleKey CircularArcKey CircularWedgeKey CuttingSectionKey CylinderKey DistantLightKey EllipseKey EllipticalArcKey GridKey InfiniteLineKey LineKey MarkerKey MeshKey NURBSCurveKey NURBSSurfaceKey PolygonKey ReferenceKey ShellKey SphereKey SpotlightKey TextKey WindowKey

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)
 
Type ObjectType () const
 
bool operator!= (Key const &in_that) const
 
Keyoperator= (Key &&in_that)
 
Keyoperator= (Key const &in_that)
 
bool operator== (Key const &in_that) const
 
SegmentKey Owner () const
 
SegmentKey Up () const
 
virtual ~Key ()
 
- Public Member Functions inherited from Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (Type in_mask) const
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
Type Type () const
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
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

Key::Key ( )

An uninitialized key refers to no database object and Type() will return Type::None.

Key::Key ( Key const &  in_that)

Shares a reference to a database object referred to by in_that.

Key::Key ( Control const &  in_control)
explicit

Initializes a key tied to the Control in_control.

Key::Key ( Key &&  in_that)

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

Parameters
in_thatAn rvalue reference to a Key to take the impl from.
virtual Key::~Key ( )
virtual

Releases a reference to this key, but it does not remove the key from the database.

Member Function Documentation

virtual void Key::Assign ( Key const &  in_that)
virtual

Share the smart-pointer.

Key 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 Key::Delete ( )

Removes the database object referred to by this key.

bool Key::Equals ( Key const &  in_that) const

Determines whether the database objects pointed to by this key and in_that are the same.

size_t Key::GetHash ( ) const

Returns a hash code for the key.

Returns
The size_t hash code.
bool Key::HasOwner ( ) const
Returns
Indicates whether this key has an owner or not.
void 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.

Type Key::ObjectType ( ) const
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 Object.

Reimplemented in OffScreenWindowKey, PortfolioKey, ApplicationWindowKey, StandAloneWindowKey, ReferenceKey, StyleKey, IncludeKey, GridKey, PolygonKey, MeshKey, ShellKey, TextKey, EllipticalArcKey, EllipseKey, NURBSSurfaceKey, NURBSCurveKey, SpotlightKey, InfiniteLineKey, CuttingSectionKey, CircularWedgeKey, CircularArcKey, CircleKey, SphereKey, CylinderKey, DistantLightKey, MarkerKey, LineKey, GeometryKey, WindowKey, and SegmentKey.

bool Key::operator!= ( Key const &  in_that) const

Determines whether the database objects pointed to by this key and in_that are the same.

Key& Key::operator= ( Key &&  in_that)

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

Parameters
in_thatAn rvalue reference to an Key to take the impl from.
Returns
A reference to this Key.
Key& Key::operator= ( Key const &  in_that)

Share the smart-pointer.

bool Key::operator== ( Key const &  in_that) const

Determines whether the database objects pointed to by this key and in_that are the same.

SegmentKey Key::Owner ( ) const
Returns
The segment containing this key.
SegmentKey Key::Up ( ) const
Returns
The segment containing this key.

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