OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022

#include <Variable.hpp>

Inheritance diagram for Variable< T, Dims >:
[legend]
Collaboration diagram for Variable< T, Dims >:
[legend]

Public Types

typedef T base_type
 
typedef NVector< T, Dims >::type type
 

Public Member Functions

 Variable ()
 
 Variable (const Product &provides)
 
 Variable (const type &&data)
 
const void * _data () const override
 
void * _data () override
 
const typedata () const
 
typedata ()
 
auto & operator[] (const size_t i)
 
OcType get_type () const override
 
size_t dimension_count () const override
 
VariableFill< T > * fill_value () const
 
void fill_value (std::unique_ptr< VariableFill< T >> &&fill_value)
 
void fill_value (const T &fill_value)
 
void scaler (std::unique_ptr< VariableScaler< T >> &&scaler)
 
VariableScaler< T > * scaler ()
 
bool is_fill_value (const T &value)
 
template<typename TT >
bool is_fill_value (const TT &value)
 
template<typename TT , typename std::enable_if< std::is_same< TT, double >::value >::type * = nullptr>
void apply_scaling (TT *v, const size_t count)
 
template<typename TT , typename std::enable_if< std::is_same< TT, long double >::value >::type * = nullptr>
void apply_scaling (TT *v, const size_t count)
 
template<typename TT , typename std::enable_if< std::is_same< TT, float >::value >::type * = nullptr>
void apply_scaling (TT *v, const size_t count)
 
template<typename TT , typename std::enable_if<!std::is_floating_point< TT >::value >::type * = nullptr>
void apply_scaling (TT *v, const size_t count)
 
virtual void rotate (const size_t number_of_lines) override
 
- Public Member Functions inherited from BaseVariable
 BaseVariable ()=default
 
 BaseVariable (const Product &provides)
 
virtual ~BaseVariable ()
 
std::unordered_map< std::string, std::string >::const_iterator attributes_begin () const
 
std::unordered_map< std::string, std::string >::const_iterator attributes_end () const
 
auto & attributes ()
 
auto & dimensions ()
 
bool has_data () const
 
const Productprovides ()
 
void provides (const Product &provides)
 
const Productprovides () const
 
const auto & name ()
 
bool matches (const Product &needs) const
 
bool matches (const BaseVariable &needs) const
 
OcGeospatialType is_geospatial () const
 
void geospatial (OcGeospatialType geo_type)
 
template<typename T >
OcType get_type (T) const
 
const std::string type_to_string ()
 

Protected Attributes

type data_ {}
 
std::unique_ptr< VariableScaler< T > > scaler_ {}
 
std::unique_ptr< VariableFill< T > > fill_value_ {}
 
- Protected Attributes inherited from BaseVariable
Product provides_ {}
 
std::unordered_map< std::string, std::stringattributes_ {}
 
std::vector< std::pair< std::string, size_t > > dimensions_ {}
 
OcGeospatialType geo_type_ {OcGeospatialType::Yes}
 

Detailed Description

template<typename T, size_t Dims>
class focs::Variable< T, Dims >

Definition at line 199 of file Variable.hpp.

Member Typedef Documentation

◆ base_type

typedef T base_type

Definition at line 201 of file Variable.hpp.

◆ type

typedef NVector<T, Dims>::type type

Definition at line 202 of file Variable.hpp.

Constructor & Destructor Documentation

◆ Variable() [1/3]

Variable ( )
inline

Definition at line 204 of file Variable.hpp.

◆ Variable() [2/3]

Variable ( const Product provides)
inline

Definition at line 205 of file Variable.hpp.

◆ Variable() [3/3]

Variable ( const type &&  data)
inline

Definition at line 206 of file Variable.hpp.

Member Function Documentation

◆ _data() [1/2]

const void* _data ( ) const
inlineoverridevirtual

Reimplemented from BaseVariable.

Definition at line 207 of file Variable.hpp.

◆ _data() [2/2]

void* _data ( )
inlineoverridevirtual

Reimplemented from BaseVariable.

Definition at line 210 of file Variable.hpp.

◆ apply_scaling() [1/4]

void apply_scaling ( TT *  v,
const size_t  count 
)
inline

Definition at line 262 of file Variable.hpp.

◆ apply_scaling() [2/4]

void apply_scaling ( TT *  v,
const size_t  count 
)
inline

Definition at line 274 of file Variable.hpp.

◆ apply_scaling() [3/4]

void apply_scaling ( TT *  v,
const size_t  count 
)
inline

Definition at line 286 of file Variable.hpp.

◆ apply_scaling() [4/4]

void apply_scaling ( TT *  v,
const size_t  count 
)
inline

Definition at line 298 of file Variable.hpp.

◆ data() [1/2]

type& data ( )
inline

Definition at line 216 of file Variable.hpp.

◆ data() [2/2]

const type& data ( ) const
inline

Definition at line 213 of file Variable.hpp.

◆ dimension_count()

size_t dimension_count ( ) const
inlineoverridevirtual

Reimplemented from BaseVariable.

Definition at line 224 of file Variable.hpp.

◆ fill_value() [1/3]

VariableFill<T>* fill_value ( ) const
inline

Definition at line 226 of file Variable.hpp.

◆ fill_value() [2/3]

void fill_value ( const T &  fill_value)
inline

Definition at line 228 of file Variable.hpp.

◆ fill_value() [3/3]

void fill_value ( std::unique_ptr< VariableFill< T >> &&  fill_value)
inline

Definition at line 227 of file Variable.hpp.

◆ get_type()

OcType get_type ( ) const
inlineoverridevirtual

Reimplemented from BaseVariable.

Definition at line 223 of file Variable.hpp.

◆ is_fill_value() [1/2]

bool is_fill_value ( const T &  value)
inline

Definition at line 236 of file Variable.hpp.

◆ is_fill_value() [2/2]

bool is_fill_value ( const TT &  value)
inline

Definition at line 243 of file Variable.hpp.

◆ operator[]()

auto& operator[] ( const size_t  i)
inline

Definition at line 219 of file Variable.hpp.

◆ rotate()

virtual void rotate ( const size_t  number_of_lines)
inlineoverridevirtual

Reimplemented from BaseVariable.

Definition at line 307 of file Variable.hpp.

◆ scaler() [1/2]

VariableScaler<T>* scaler ( )
inline

Definition at line 231 of file Variable.hpp.

◆ scaler() [2/2]

void scaler ( std::unique_ptr< VariableScaler< T >> &&  scaler)
inline

Definition at line 230 of file Variable.hpp.

Member Data Documentation

◆ data_

type data_ {}
protected

Definition at line 327 of file Variable.hpp.

◆ fill_value_

std::unique_ptr<VariableFill<T> > fill_value_ {}
protected

Definition at line 330 of file Variable.hpp.

◆ scaler_

std::unique_ptr<VariableScaler<T> > scaler_ {}
protected

Definition at line 329 of file Variable.hpp.


The documentation for this class was generated from the following file:
  • /gfs-oceanweb/web/ocssw/ocssw_src/include/focs/Variable.hpp