PCL
pcl::FITSHeaderKeyword Class Reference

FITS header keyword More...

#include <FITSHeaderKeyword.h>

Public Member Functions

 FITSHeaderKeyword ()=default
 
 FITSHeaderKeyword (const FITSHeaderKeyword &)=default
 
 FITSHeaderKeyword (const IsoString &a_name, const IsoString &a_value=IsoString(), const IsoString &a_comment=IsoString())
 
 FITSHeaderKeyword (FITSHeaderKeyword &&)=default
 
bool FixValueDelimiters ()
 
bool GetNumericValue (double &v) const
 
bool IsBoolean () const
 
bool IsNull () const
 
bool IsNumeric () const
 
bool IsString () const
 
FITSHeaderKeywordoperator= (const FITSHeaderKeyword &)=default
 
IsoString StripValueDelimiters () const
 
void Trim ()
 

Public Attributes

IsoString comment
 Keyword comment.
 
IsoString name
 Keyword name.
 
IsoString value
 Keyword value.
 

Detailed Description

Definition at line 72 of file FITSHeaderKeyword.h.

Constructor & Destructor Documentation

◆ FITSHeaderKeyword() [1/4]

pcl::FITSHeaderKeyword::FITSHeaderKeyword ( )
default

Constructs a FITSHeaderKeyword object with empty name, value and comment components.

◆ FITSHeaderKeyword() [2/4]

pcl::FITSHeaderKeyword::FITSHeaderKeyword ( const FITSHeaderKeyword )
default

Copy constructor.

◆ FITSHeaderKeyword() [3/4]

pcl::FITSHeaderKeyword::FITSHeaderKeyword ( FITSHeaderKeyword &&  )
default

Move constructor.

◆ FITSHeaderKeyword() [4/4]

pcl::FITSHeaderKeyword::FITSHeaderKeyword ( const IsoString a_name,
const IsoString a_value = IsoString(),
const IsoString a_comment = IsoString() 
)
inline

Constructs a FITSHeaderKeyword object with the specified name, value and comment components.

Definition at line 100 of file FITSHeaderKeyword.h.

Member Function Documentation

◆ FixValueDelimiters()

bool pcl::FITSHeaderKeyword::FixValueDelimiters ( )
inline

If this keyword has a string value without leading and trailing quotes, this member function adds them, as required by the FITS standard. Returns true if the value was fixed, false if the value was not changed.

Definition at line 209 of file FITSHeaderKeyword.h.

References pcl::GenericString< T, R, A >::EnsureSingleQuoted(), pcl::ProcessParameterType::IsNumeric(), and pcl::IsoString::TryToDouble().

◆ GetNumericValue()

bool pcl::FITSHeaderKeyword::GetNumericValue ( double &  v) const
inline

Gets the numeric value of this FITS keyword in the specified variable v, or zero if this keyword has no numeric value.

Returns true iff this keyword has a valid numeric value. This member function does not throw exceptions, even if the keyword's value contains an illegal numeric representation.

Definition at line 174 of file FITSHeaderKeyword.h.

References pcl::IsoString::TryToDouble().

◆ IsBoolean()

bool pcl::FITSHeaderKeyword::IsBoolean ( ) const
inline

Returns true iff this FITS keyword has a boolean value.

A boolean value is assumed if the value component is equal to 'T' or 'F' for true and false, respectively.

Definition at line 150 of file FITSHeaderKeyword.h.

◆ IsNull()

bool pcl::FITSHeaderKeyword::IsNull ( ) const
inline

Returns true iff this FITS keyword has no value (i.e., if the value member is an empty string).

Definition at line 128 of file FITSHeaderKeyword.h.

References pcl::GenericString< T, R, A >::IsEmpty().

◆ IsNumeric()

bool pcl::FITSHeaderKeyword::IsNumeric ( ) const
inline

Returns true iff this FITS keyword has a numeric value.

A numeric value is assumed if the value component is a valid representation of an integer or floating point number.

Definition at line 161 of file FITSHeaderKeyword.h.

References pcl::GenericString< T, R, A >::IsNumeral().

◆ IsString()

bool pcl::FITSHeaderKeyword::IsString ( ) const
inline

Returns true iff this FITS keyword has a string value.

A string value is assumed if the value component begins with a single quote (').

Definition at line 139 of file FITSHeaderKeyword.h.

References pcl::GenericString< T, R, A >::StartsWith().

◆ operator=()

FITSHeaderKeyword& pcl::FITSHeaderKeyword::operator= ( const FITSHeaderKeyword )
default

Assignment operator. Returns a reference to this object.

◆ StripValueDelimiters()

IsoString pcl::FITSHeaderKeyword::StripValueDelimiters ( ) const
inline

Returns the string value of this FITS header keyword (irrespective of its data type), with delimiters pulled off and leading/trailing whitespace trimmed out.

Definition at line 187 of file FITSHeaderKeyword.h.

References pcl::GenericString< T, R, A >::IsEmpty(), and pcl::GenericString< T, R, A >::Length().

◆ Trim()

void pcl::FITSHeaderKeyword::Trim ( )
inline

Removes leading and trailing spaces in the name, value and comment components of this FITS header keyword.

Definition at line 227 of file FITSHeaderKeyword.h.

References pcl::GenericString< T, R, A >::Trim().


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