Skip to content

Class AIAC::GORegistry

ClassList > AIAC > GORegistry

Public Functions

Type Name
uint32_t CheckIfKeyExists (uint32_t key)
Check if a GO is in the registry by id.
void Clear ()
Clear the registry from all the entries.
uint32_t Count () const
Get the total number of GOs in the registry.
GORegistry () = default
void GetAllGOs (std::vector< std::shared_ptr< GOPoint >> & points, std::vector< std::shared_ptr< GOLine >> & lines, std::vector< std::shared_ptr< GOCircle >> & circles, std::vector< std::shared_ptr< GOCylinder >> & cylinders, std::vector< std::shared_ptr< GOPolyline >> & polylines, std::vector< std::shared_ptr< GOTriangle >> & triangles, std::vector< std::shared_ptr< GOMesh >> & meshes, std::vector< std::shared_ptr< GOText >> & texts)
Get the All GOs by category.
std::vector< std::shared_ptr< T > > GetAllGOs ()
Get all GOs of a specific type in the registry.
void GetAllGOs (std::vector< std::shared_ptr< GOPrimitive >> & goVector)
Get the All GOs as primitives.
std::shared_ptr< T > GetGO (const uint32_t & id)
Retrieve the GO pointer from the registry by index and template as GOObject.
void Init ()
void Register (std::shared_ptr< T > go)
Add a GO to the registry.
void Register (const uint32_t & id, std::shared_ptr< T > go)
Add a GO to the registry with a given id.
void Unregister (const uint32_t & id)
Erase the GO from the register.
~GORegistry () = default

Public Functions Documentation

function CheckIfKeyExists

Check if a GO is in the registry by id.

inline uint32_t AIAC::GORegistry::CheckIfKeyExists (
    uint32_t key
) 

Parameters:

  • id Id of the object to check.

function Clear

Clear the registry from all the entries.

inline void AIAC::GORegistry::Clear () 


function Count

Get the total number of GOs in the registry.

inline uint32_t AIAC::GORegistry::Count () const


function GORegistry

AIAC::GORegistry::GORegistry () = default

function GetAllGOs [⅓]

Get the All GOs by category.

inline void AIAC::GORegistry::GetAllGOs (
    std::vector< std::shared_ptr< GOPoint >> & points,
    std::vector< std::shared_ptr< GOLine >> & lines,
    std::vector< std::shared_ptr< GOCircle >> & circles,
    std::vector< std::shared_ptr< GOCylinder >> & cylinders,
    std::vector< std::shared_ptr< GOPolyline >> & polylines,
    std::vector< std::shared_ptr< GOTriangle >> & triangles,
    std::vector< std::shared_ptr< GOMesh >> & meshes,
    std::vector< std::shared_ptr< GOText >> & texts
) 

Parameters:

  • points A vector of all GOPoints to pass as reference.
  • lines A vector of all GOLines to pass as reference.
  • circles A vector of all GOCircles to pass as reference.
  • cylinders A vector of all GOCylinders to pass as reference.
  • polylines A vector of all GOPolylines to pass as reference.
  • triangles A vector of all GOTriangles to pass as reference.
  • texts A vector of all GOTexts to pass as reference.

function GetAllGOs [⅔]

Get all GOs of a specific type in the registry.

template<typename T>
inline std::vector< std::shared_ptr< T > > AIAC::GORegistry::GetAllGOs () 


function GetAllGOs [3/3]

Get the All GOs as primitives.

inline void AIAC::GORegistry::GetAllGOs (
    std::vector< std::shared_ptr< GOPrimitive >> & goVector
) 

Parameters:

  • goVector A reference vector to load with all the GOPrimitives.

function GetGO

Retrieve the GO pointer from the registry by index and template as GOObject.

template<typename T>
inline std::shared_ptr< T > AIAC::GORegistry::GetGO (
    const uint32_t & id
) 

Parameters:

  • id Id of the object when created.

function Init

inline void AIAC::GORegistry::Init () 

function Register [½]

Add a GO to the registry.

template<typename T>
inline void AIAC::GORegistry::Register (
    std::shared_ptr< T > go
) 

Parameters:

  • id Id of the object to register.
  • go Smart pointer to the object to register.

function Register [2/2]

Add a GO to the registry with a given id.

template<typename T>
inline void AIAC::GORegistry::Register (
    const uint32_t & id,
    std::shared_ptr< T > go
) 

Parameters:

  • id Id of the object to register.
  • go Smart pointer to the object to register.

function Unregister

Erase the GO from the register.

inline void AIAC::GORegistry::Unregister (
    const uint32_t & id
) 

Parameters:

  • id Id of the object to erase from the register.

function ~GORegistry

AIAC::GORegistry::~GORegistry () = default


The documentation for this class was generated from the following file src/AIAC/GOSys/GORegistry.h