atlas
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
atlas::field::FieldSetImpl Class Reference

Represents a set of fields, where order is preserved. More...

#include <FieldSet.h>

Inheritance diagram for atlas::field::FieldSetImpl:
Inheritance graph
[legend]
Collaboration diagram for atlas::field::FieldSetImpl:
Collaboration graph
[legend]

Public Types

using iterator = std::vector< Field >::iterator
 
using const_iterator = std::vector< Field >::const_iterator
 
template<bool pred>
using enable_if_t = typename std::enable_if< pred, int >::type
 
template<typename T >
using enable_if_index_t = enable_if_t< is_index< T >()>
 

Public Member Functions

 FieldSetImpl (const std::string &name="untitled")
 Constructs an empty FieldSet.
 
idx_t size () const
 
bool empty () const
 
void clear ()
 
const std::string & name () const
 
std::string & name ()
 
template<typename Index , enable_if_index_t< Index > = 0>
const Fieldoperator[] (Index i) const
 
template<typename Index , enable_if_index_t< Index > = 0>
Fieldoperator[] (Index i)
 
const Fieldoperator[] (const std::string &name) const
 
Fieldoperator[] (const std::string &name)
 
template<typename Index , enable_if_index_t< Index > = 0>
const Fieldfield (Index i) const
 
template<typename Index , enable_if_index_t< Index > = 0>
Fieldfield (Index i)
 
std::vector< std::string > field_names () const
 
Field add (const Field &)
 
bool has_field (const std::string &name) const
 
Fieldfield (const std::string &name) const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
void haloExchange (bool on_device=false) const
 
void adjointHaloExchange (bool on_device=false) const
 
void set_dirty (bool=true) const
 

Static Public Member Functions

template<typename T >
static constexpr bool is_index ()
 

Protected Attributes

std::vector< Fieldfields_
 field storage
 
std::string name_
 internal name
 
std::map< std::string, idx_tindex_
 name-to-index map, to refer fields by name
 

Detailed Description

Represents a set of fields, where order is preserved.


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