Kaim::NavFloorRawPtr Class Reference

Kaim::NavFloorRawPtr Class Reference

#include <navfloorrawptr.h>

Class Description

Each instance of this class uniquely identifies a single NavFloor.

This pointer is guaranteed to be valid only in the frame in which it was retrieved.

Never store a NavFloorRawPtr for use in subsequent frames, because it has no protection against data streaming. Use NavFloorPtr instead.

Actually, this class is used internally for some performance and working memory usage friendliness reason (no ref-counting increment/decrement, no need to call constructor/destructor), but unless you really know what you do prefer NavFloorPtr which is safer.

+ Examples:

Public Member Functions

 NavFloorRawPtr ()
 
 NavFloorRawPtr (NavFloor *navFloor)
 
const CellPosGetCellPos () const
 
NavFloorGetNavFloor () const
 
const NavFloorBlobGetNavFloorBlob () const
 
void Invalidate ()
 
bool IsValid () const
 
bool operator!= (const NavFloorRawPtr &rhs) const
 
bool operator== (const NavFloorRawPtr &rhs) const
 
void Set (NavFloor *navFloor)
 

Constructor & Destructor Documentation

Kaim::NavFloorRawPtr::NavFloorRawPtr ( )
inline

Creates an invalid NavFloorRawPtr.

Kaim::NavFloorRawPtr::NavFloorRawPtr ( NavFloor navFloor)
inlineexplicit

Creates a new NavFloorRawPtr pointing on the provided NavFloor.

Parameters
navFloorA pointer to the NavFloor this object should refer to.

Member Function Documentation

const CellPos & Kaim::NavFloorRawPtr::GetCellPos ( ) const
inline

Returns a const reference to the CellPos that indicates the position of the cell that contains this NavFloor within the grid of NavData cells.

Precondition
This object must be valid. Its validity is not checked.
NavFloor * Kaim::NavFloorRawPtr::GetNavFloor ( ) const
inline

Returns a reference to the NavFloor identified by this object.

const NavFloorBlob * Kaim::NavFloorRawPtr::GetNavFloorBlob ( ) const
inline

Returns a reference to the NavFloor identified by this object.

Precondition
This object must be valid. Its validity is not checked.
void Kaim::NavFloorRawPtr::Invalidate ( )
inline

Invalidates this object.

bool Kaim::NavFloorRawPtr::IsValid ( ) const
inline

Returns true if this object refers to a valid NavFloor, which means a NavFloor:

  1. that exists,
  2. whose underlying static data (NavFloorBlob) has not been removed from the Database and
  3. which is active (in term of overlap and dynamic version).

bool Kaim::NavFloorRawPtr::operator!= ( const NavFloorRawPtr rhs) const
inline

Returns true if this object identifies a different NavFloor from rhs.

bool Kaim::NavFloorRawPtr::operator== ( const NavFloorRawPtr rhs) const
inline

Returns true if this object identifies the same NavFloor as rhs, or if both are invalid.

void Kaim::NavFloorRawPtr::Set ( NavFloor navFloor)
inline

Sets the information maintained by this object.

Parameters
navFloorA pointer to the NavFloor we want the NavFloorRawPtr refers to.

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