Kaim::NavFloorPtr Class Reference

Kaim::NavFloorPtr Class Reference

#include <navfloorptr.h>

Class Description

Each instance of this class uniquely identifies a single NavFloor.

Instances of this class can be safely stored and used in subsequent frames.

Main API Functions

 NavFloorPtr (NavFloor *navFloor=nullptr)
 Creates an invalid NavFloorPtr. More...
 
 NavFloorPtr (const NavFloorRawPtr &navFloorRawPtr)
 Creates a new NavFloorPtr copying information from the provided one. More...
 
bool IsValid () const
 Returns true if this object refers to a valid NavFloor, which means a NavFloor:

  1. that is not null,
  2. whose underlying static data (NavFloorBlob) has not been removed from the Database
  3. which is active in the database (in terms of overlap and dynamic version) if m_navFloorPtr is invalid IsValid() sets m_navFloorPtr = nullptr as Invalidate() would do (note: his a bit questionnable to do)
More...
 
void Invalidate ()
 m_navFloorPtr = nullptr; More...
 
bool operator== (const NavFloorPtr &rhs) const
 Returns true if this object identifies the same NavFloor as rhs, or if both are invalid. More...
 
bool operator!= (const NavFloorPtr &rhs) const
 Returns true if this object identifies a different NavFloor from rhs. More...
 
NavFloorGetNavFloor () const
 Returns a pointer to the NavFloor identified by this object. Returns nullptr if this object is not valid. More...
 
const NavFloorBlobGetNavFloorBlob () const
 Returns a const pointer to the NavFloorBlob identified by this object. Returns nullptr if this object is not valid. More...
 

Member Functions for valid instance

NavFloorGetNavFloor_Unsafe () const
 Returns a pointer to the NavFloor identified by this object. More...
 
const NavFloorBlobGetNavFloorBlob_Unsafe () const
 Returns a const pointer to the NavFloorBlob identified by this object. More...
 
NavFloorRawPtr GetRawPtr () const
 Constructs and returns a NavFloorRawPtr that refers to the same NavFloor. More...
 
const CellPosGetCellPos () const
 Returns a const reference to the CellPos that indicates the position of the cell that contains this NavFloor. More...
 

Constructor & Destructor Documentation

Kaim::NavFloorPtr::NavFloorPtr ( NavFloor navFloor = nullptr)
inline

Creates an invalid NavFloorPtr.

Kaim::NavFloorPtr::NavFloorPtr ( const NavFloorRawPtr navFloorRawPtr)
inlineexplicit

Creates a new NavFloorPtr copying information from the provided one.

Member Function Documentation

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

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

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

Returns a pointer to the NavFloor identified by this object. Returns nullptr if this object is not valid.

NavFloor * Kaim::NavFloorPtr::GetNavFloor_Unsafe ( ) const
inline

Returns a pointer to the NavFloor identified by this object.

Precondition
All these function should be called only if IsValid() returns true.
This object must be valid. Its validity is not checked.
const NavFloorBlob * Kaim::NavFloorPtr::GetNavFloorBlob ( ) const
inline

Returns a const pointer to the NavFloorBlob identified by this object. Returns nullptr if this object is not valid.

const NavFloorBlob * Kaim::NavFloorPtr::GetNavFloorBlob_Unsafe ( ) const
inline

Returns a const pointer to the NavFloorBlob identified by this object.

Precondition
This object must be valid. Its validity is not checked.
NavFloorRawPtr Kaim::NavFloorPtr::GetRawPtr ( ) const
inline

Constructs and returns a NavFloorRawPtr that refers to the same NavFloor.

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

m_navFloorPtr = nullptr;

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

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

  1. that is not null,
  2. whose underlying static data (NavFloorBlob) has not been removed from the Database
  3. which is active in the database (in terms of overlap and dynamic version) if m_navFloorPtr is invalid IsValid() sets m_navFloorPtr = nullptr as Invalidate() would do (note: his a bit questionnable to do)

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

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

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

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


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