opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
opyn::ModelStates Class Referencefinal

Represents a sequence of ModelStates stored in shared handles. More...

#include <model_states.h>

Public Types

using value_type = ModelState
 
using size_type = size_t
 
using reference = value_type &
 
using const_reference = const value_type &
 
using shared_handle = std::shared_ptr< value_type >
 

Public Member Functions

 ModelStates ()=default
 Constructs an empty sequence of states.
 
size_t size () const
 Returns the number of elements in the container.
 
reference at (size_t pos)
 Returns a reference to the element at specified location pos, with bounds checking.
 
const_reference at (size_t pos) const
 Returns a reference to the element at specified location pos, with bounds checking.
 
void reserve (size_type new_cap)
 Increases the capacity of the container to a value that's greater or equal to new_cap.
 
template<typename... Args>
requires std::constructible_from<ModelState, Args&&...>
reference emplace_back (Args &&... args)
 
void handle_push_back (shared_handle handle)
 Appends a shared handle of ModelState to the end of the sequence.
 
shared_handle handle_at (size_t pos)
 Returns a shared handle to the element at specified location pos, with bounds checking.
 
std::vector< shared_handleto_handle_list () const
 Converts this ModelStates into a std::vector its shared_handles.
 
auto begin () const
 
auto end () const
 

Detailed Description

Represents a sequence of ModelStates stored in shared handles.

Member Typedef Documentation

◆ const_reference

◆ reference

◆ shared_handle

using opyn::ModelStates::shared_handle = std::shared_ptr<value_type>

◆ size_type

◆ value_type

Constructor & Destructor Documentation

◆ ModelStates()

opyn::ModelStates::ModelStates ( )
default

Constructs an empty sequence of states.

Member Function Documentation

◆ at() [1/2]

reference opyn::ModelStates::at ( size_t  pos)
inline

Returns a reference to the element at specified location pos, with bounds checking.

◆ at() [2/2]

const_reference opyn::ModelStates::at ( size_t  pos) const
inline

Returns a reference to the element at specified location pos, with bounds checking.

◆ begin()

auto opyn::ModelStates::begin ( ) const
inline

◆ emplace_back()

template<typename... Args>
requires std::constructible_from<ModelState, Args&&...>
reference opyn::ModelStates::emplace_back ( Args &&...  args)
inline

Appends a new ModelState to the end of the sequence. The ModelState is constructed in-place with the provided arguments.

◆ end()

auto opyn::ModelStates::end ( ) const
inline

◆ handle_at()

shared_handle opyn::ModelStates::handle_at ( size_t  pos)
inline

Returns a shared handle to the element at specified location pos, with bounds checking.

◆ handle_push_back()

void opyn::ModelStates::handle_push_back ( shared_handle  handle)
inline

Appends a shared handle of ModelState to the end of the sequence.

◆ reserve()

void opyn::ModelStates::reserve ( size_type  new_cap)
inline

Increases the capacity of the container to a value that's greater or equal to new_cap.

◆ size()

size_t opyn::ModelStates::size ( ) const
inline

Returns the number of elements in the container.

◆ to_handle_list()

std::vector< shared_handle > opyn::ModelStates::to_handle_list ( ) const
inline

Converts this ModelStates into a std::vector its shared_handles.


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