Clementine
Public Member Functions | List of all members
entt::basic_organizer< Entity >::vertex Struct Reference

Vertex type of a task graph defined as an adjacency list. More...

#include <entt.hpp>

Public Member Functions

 vertex (const bool vtype, vertex_data data, std::vector< std::size_t > edges)
 Constructs a vertex of the task graph. More...
 
size_type ro_dependency (type_info *buffer, const std::size_t length) const ENTT_NOEXCEPT
 Fills a buffer with the type info objects for the writable resources of a vertex. More...
 
size_type rw_dependency (type_info *buffer, const std::size_t length) const ENTT_NOEXCEPT
 Fills a buffer with the type info objects for the read-only resources of a vertex. More...
 
size_type ro_count () const ENTT_NOEXCEPT
 Returns the number of read-only resources of a vertex. More...
 
size_type rw_count () const ENTT_NOEXCEPT
 Returns the number of writable resources of a vertex. More...
 
bool top_level () const ENTT_NOEXCEPT
 Checks if a vertex is also a top-level one. More...
 
type_info info () const ENTT_NOEXCEPT
 Returns a type info object associated with a vertex. More...
 
const char * name () const ENTT_NOEXCEPT
 Returns a user defined name associated with a vertex, if any. More...
 
function_typecallback () const ENTT_NOEXCEPT
 Returns the function associated with a vertex. More...
 
const void * data () const ENTT_NOEXCEPT
 Returns the payload associated with a vertex, if any. More...
 
const std::vector< std::size_t > & children () const ENTT_NOEXCEPT
 Returns the list of nodes reachable from a given vertex. More...
 
void prepare (basic_registry< entity_type > &reg) const
 Prepares a registry and assures that all required resources are properly instantiated before using them. More...
 

Detailed Description

template<typename Entity>
struct entt::basic_organizer< Entity >::vertex

Vertex type of a task graph defined as an adjacency list.

Constructor & Destructor Documentation

◆ vertex()

template<typename Entity >
entt::basic_organizer< Entity >::vertex::vertex ( const bool  vtype,
vertex_data  data,
std::vector< std::size_t >  edges 
)
inline

Constructs a vertex of the task graph.

Parameters
vtypeTrue if the vertex is a top-level one, false otherwise.
dataThe data associated with the vertex.
edgesThe indices of the children in the adjacency list.

Member Function Documentation

◆ callback()

template<typename Entity >
function_type* entt::basic_organizer< Entity >::vertex::callback ( ) const
inline

Returns the function associated with a vertex.

Returns
The function associated with the vertex.

◆ children()

template<typename Entity >
const std::vector<std::size_t>& entt::basic_organizer< Entity >::vertex::children ( ) const
inline

Returns the list of nodes reachable from a given vertex.

Returns
The list of nodes reachable from the vertex.

◆ data()

template<typename Entity >
const void* entt::basic_organizer< Entity >::vertex::data ( ) const
inline

Returns the payload associated with a vertex, if any.

Returns
The payload associated with the vertex, if any.

◆ info()

template<typename Entity >
type_info entt::basic_organizer< Entity >::vertex::info ( ) const
inline

Returns a type info object associated with a vertex.

Returns
A properly initialized type info object.

◆ name()

template<typename Entity >
const char* entt::basic_organizer< Entity >::vertex::name ( ) const
inline

Returns a user defined name associated with a vertex, if any.

Returns
The user defined name associated with the vertex, if any.

◆ prepare()

template<typename Entity >
void entt::basic_organizer< Entity >::vertex::prepare ( basic_registry< entity_type > &  reg) const
inline

Prepares a registry and assures that all required resources are properly instantiated before using them.

Parameters
regA valid registry.

◆ ro_count()

template<typename Entity >
size_type entt::basic_organizer< Entity >::vertex::ro_count ( ) const
inline

Returns the number of read-only resources of a vertex.

Returns
The number of read-only resources of the vertex.

◆ ro_dependency()

template<typename Entity >
size_type entt::basic_organizer< Entity >::vertex::ro_dependency ( type_info buffer,
const std::size_t  length 
) const
inline

Fills a buffer with the type info objects for the writable resources of a vertex.

Parameters
bufferA buffer pre-allocated by the user.
lengthThe length of the user-supplied buffer.
Returns
The number of type info objects written to the buffer.

◆ rw_count()

template<typename Entity >
size_type entt::basic_organizer< Entity >::vertex::rw_count ( ) const
inline

Returns the number of writable resources of a vertex.

Returns
The number of writable resources of the vertex.

◆ rw_dependency()

template<typename Entity >
size_type entt::basic_organizer< Entity >::vertex::rw_dependency ( type_info buffer,
const std::size_t  length 
) const
inline

Fills a buffer with the type info objects for the read-only resources of a vertex.

Parameters
bufferA buffer pre-allocated by the user.
lengthThe length of the user-supplied buffer.
Returns
The number of type info objects written to the buffer.

◆ top_level()

template<typename Entity >
bool entt::basic_organizer< Entity >::vertex::top_level ( ) const
inline

Checks if a vertex is also a top-level one.

Returns
True if the vertex is a top-level one, false otherwise.

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