| LSSTApplications
    20.0.0
    LSSTDataManagementBasePackage | 
 
 
 
Go to the documentation of this file.
   45         : 
Channel(reinterpret_cast<AstChannel *>(
 
   46                           astFitsChan(detail::
source, detail::
sink, 
"%s", options.c_str())),
 
   63     double *rawval = 
reinterpret_cast<double(&)[2]
>(
val);
 
   64     bool found = astGetFitsCF(
getRawPtr(), cstrOrNull(
name), rawval);
 
   71     bool found = astGetFitsCN(
getRawPtr(), cstrOrNull(
name), &rawval);
 
   92     int val = 
static_cast<int>(defval);
 
  100     bool found = astGetFitsS(
getRawPtr(), cstrOrNull(
name), &rawval);
 
  107     int const initialIndex = 
getCard();
 
  112         for (
auto i = 1; i <= numCards; ++i) {
 
  127     bool success = 
static_cast<bool>(astFindFits(
getRawPtr(), 
name.c_str(), fitsbuf.
get(), inc));
 
  134     int hasvalue = astTestFits(
getRawPtr(), cstrOrNull(
name), &there);
 
  
FoundValue< std::string > getFitsCN(std::string const &name="", std::string defval="") const
Get the value of a CONTINUE card.
@ NOVALUE
keyword is present, but has no value
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Throw std::runtime_error if AST's state is bad.
A value and associated validity flag.
FoundValue< std::string > findFits(std::string const &name, bool inc)
Search for a card in a FitsChan by keyword.
std::string getCardName() const
Get CardName: the keyword name of the current card.
std::vector< std::string > getAllCardNames()
Get the name of all cards, in order, starting from the first card.
int getNCard() const
Get NCard: the number of cards.
FitsChan(Stream &stream, std::string const &options="")
Construct a channel that uses a provided Stream.
void setCard(int ind)
Set Card: the index of the current card, where 1 is the first card.
Channel provides input/output of AST objects.
A stream for ast::Channel.
FoundValue< std::complex< double > > getFitsCF(std::string const &name="", std::complex< double > defval={0, 0}) const
Get the value of a complex double card.
const char * source()
Source function that allows astChannel to source from a Stream.
FoundValue< int > getFitsI(std::string const &name="", int defval=0) const
Get the value of a int card.
FitsKeyState testFits(std::string const &name="") const
Determine if a card is present, and if so, whether it has a value.
FoundValue< std::string > getFitsS(std::string const &name="", std::string defval="") const
Get the value of a string card.
AST wrapper classes and functions.
T emplace_back(T... args)
FoundValue< double > getFitsF(std::string const &name="", double defval=0) const
Get the value of a double card.
int getCard() const
Get Card: the index of the current card, where 1 is the first card.
AstObject const  * getRawPtr() const
Get the raw AST pointer.
FitsKeyState
Enums describing the presence or absence of a FITS keyword.
@ PRESENT
keyword is present and has a value
FoundValue< bool > getFitsL(std::string const &name="", bool defval=false) const
Get the value of a bool card.
@ ABSENT
keyword is not present
void sink(const char *cstr)
Sink function that allows astChannel to sink to a Stream.