EleFits  5.0.0
A modern C++ API on top of CFITSIO
Static Public Attributes | Static Public Member Functions | Public Member Functions | List of all members
KeywordCategory Class Reference

#include <KeywordCategory.h>

Detailed Description

Keyword categories and related tools.

Can be used as a mask to combine different categories, e.g.:

auto allButComments = KeywordCategory::All & ~KeywordCategory::Comment;
static const KeywordCategory User
User-defined keywords.
Definition: KeywordCategory.h:31
static const KeywordCategory All
All keywords.
Definition: KeywordCategory.h:33
static const KeywordCategory Comment
COMMENT and HISTORY keywords (non-valued reserved keywords).
Definition: KeywordCategory.h:30
static const KeywordCategory Reserved
Optional standard keywords excluding COMMENT and HISTORY.
Definition: KeywordCategory.h:29

Static Public Attributes

static const KeywordCategory Mandatory
 Mandatory standard keyword.
 
static const KeywordCategory Reserved
 Optional standard keywords excluding COMMENT and HISTORY.
 
static const KeywordCategory Comment
 COMMENT and HISTORY keywords (non-valued reserved keywords).
 
static const KeywordCategory User
 User-defined keywords.
 
static const KeywordCategory None
 No keyword.
 
static const KeywordCategory All
 All keywords.
 

Static Public Member Functions

static std::vector< std::stringfilterCategories (const std::vector< std::string > &keywords, KeywordCategory categories)
 Keep only keywords of given categories. More...
 
static bool belongsCategories (const std::string &keyword, KeywordCategory categories)
 Check whether a keyword is of any of the given categories. More...
 
static bool matches (const std::string &test, const std::string &ref)
 Check whether a test keyword matches a reference keyword. More...
 

Public Member Functions

bool operator== (KeywordCategory rhs) const
 Check equality.
 
bool operator!= (KeywordCategory rhs) const
 Check inequality.
 
KeywordCategory operator| (KeywordCategory rhs) const
 Bit-wise OR operator for masking.
 
KeywordCategoryoperator|= (KeywordCategory rhs)
 In-place bit-wise OR operator for masking.
 
KeywordCategory operator& (KeywordCategory rhs) const
 Bit-wise AND operator for masking.
 
KeywordCategoryoperator&= (KeywordCategory rhs)
 In-place bit-wise AND operator for masking. More...
 
KeywordCategory operator~ () const
 Bit-wise binary NOT operator for masking. More...
 
 operator bool () const
 Cast to bool. More...
 

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