Gazebo Common

API Reference

5.6.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. More...
 
const std::vector< K > Keys () const
 Retrieve all keys. More...
 
V & operator[] (const K &_key)
 Fetch mutable reference to column. More...
 
const V & operator[] (const K &_key) const
 Fetch immutable reference to column. More...
 

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()

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()

const std::vector<K> Keys ( ) const
inline

Retrieve all keys.

Returns
A vector with keys

References vector< T >::push_back().

◆ operator[]() [1/2]

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]

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: