DP3
Public Types | Public Member Functions | Friends | List of all members
dp3::common::Fields Class Reference

#include <Fields.h>

Public Types

enum class  Single {
  kData , kFlags , kWeights , kUvw ,
  kCount
}
 

Public Member Functions

constexpr Fields ()
 
constexpr Fields (Single field)
 
constexpr bool Data () const
 
constexpr bool Flags () const
 
Fieldsoperator|= (const Fields &other)
 
FieldsUpdateRequirements (const Fields &required, const Fields &provided)
 
constexpr bool Uvw () const
 
constexpr bool Weights () const
 

Friends

bool operator!= (const Fields &left, const Fields &right)
 
std::ostream & operator<< (std::ostream &, const Fields &fields)
 
bool operator== (const Fields &left, const Fields &right)
 
Fields operator| (const Fields &left, const Fields &right)
 

Detailed Description

Specifies which data types a Step uses.

Member Enumeration Documentation

◆ Single

Values for specifying a single need.

Enumerator
kData 

Is the visibility data needed?

kFlags 

Are the flags needed?

kWeights 

Are the weights needed?

kUvw 

Are the uvw needed?

kCount 

Number of fields. Must be last.

Constructor & Destructor Documentation

◆ Fields() [1/2]

constexpr dp3::common::Fields::Fields ( )
inlineconstexpr

Creates a Fields object with no set fields.

◆ Fields() [2/2]

constexpr dp3::common::Fields::Fields ( Single  field)
inlineexplicitconstexpr

Creates a Fields object with a single field.

Parameters
fieldThe single field that must be set. Cannot be Single::kCount.

Member Function Documentation

◆ Data()

constexpr bool dp3::common::Fields::Data ( ) const
inlineconstexpr
Returns
True if visibility data is needed, false if not.

◆ Flags()

constexpr bool dp3::common::Fields::Flags ( ) const
inlineconstexpr
Returns
True if flags are needed, false if not.

◆ operator|=()

Fields& dp3::common::Fields::operator|= ( const Fields other)
inline

Adds the fields of another Fields object to the current object.

Parameters
otherOther fields value.
Returns
A reference to the current Fields object.

◆ UpdateRequirements()

Fields& dp3::common::Fields::UpdateRequirements ( const Fields required,
const Fields provided 
)
inline

Updates the current object's Fields based on a step's required and provided Fields. The current object's single field is set to false if the step creates it (provides the field, but does not require it).

Parameters
requiredStep's required Fields.
providedStep's provided Fields.
Returns
A reference to the current Fields object.

◆ Uvw()

constexpr bool dp3::common::Fields::Uvw ( ) const
inlineconstexpr
Returns
True if uvw values are needed, false if not.

◆ Weights()

constexpr bool dp3::common::Fields::Weights ( ) const
inlineconstexpr
Returns
True if weights are needed, false if not.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const Fields left,
const Fields right 
)
friend

Checks if two Fields objects contain different fields.

Returns
true if the objects differ, false otherwise.

◆ operator<<

std::ostream& operator<< ( std::ostream &  ,
const Fields fields 
)
friend

Write a Fields object to an output stream

◆ operator==

bool operator== ( const Fields left,
const Fields right 
)
friend

Checks if two Fields objects contain the same fields.

Returns
true if the objects are equal, false otherwise.

◆ operator|

Fields operator| ( const Fields left,
const Fields right 
)
friend

Combines two Fields objects.

Returns
A Fields object with the fields of both arguments.

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