Gazebo Common

API Reference

6.0.0
DataFrame< K, V > Class Template Reference

An abstract data frame. More...

#include <DataFrame.hh>

Public Member Functions

bool Has (const K &_key) const
 Check if column is present.
 
const std::vector< K > Keys () const
 Retrieve all keys.
 
V & operator[] (const K &_key)
 Fetch mutable reference to column.
 
const V & operator[] (const K &_key) const
 Fetch immutable reference to column.
 

Detailed Description

template<typename K, typename V>
class gz::common::DataFrame< K, V >

An abstract data frame.

Template Parameters
KColumn key type
VColumn value type

Member Function Documentation

◆ Has()

template<typename K , typename V >
bool Has ( const K &  _key) const
inline

Check if column is present.

Parameters
[in]_keyKey to column to look up.
Returns
whether the given column is present in the data frame.

References unordered_map< K, T >::count().

◆ Keys()

template<typename K , typename V >
const std::vector< K > Keys ( ) const
inline

Retrieve all keys.

Returns
A vector with keys

References vector< T >::push_back().

◆ operator[]() [1/2]

template<typename K , typename V >
V & operator[] ( const K &  _key)
inline

Fetch mutable reference to column.

Parameters
[in]_keyKey to column to look up.
Returns
Mutable reference to column in the data frame.

◆ operator[]() [2/2]

template<typename K , typename V >
const V & operator[] ( const K &  _key) const
inline

Fetch immutable reference to column.

Parameters
[in]_keyKey to column to look up.
Returns
Immutable reference to column in the data frame.

References unordered_map< K, T >::at().


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