EleFits  5.3.0
A modern C++ API on top of CFITSIO
Loading...
Searching...
No Matches

◆ generate_random_record()

static Record< T > generate_random_record ( const std::string type_name)
static

Generate a random record.

Template Parameters
TThe value type.
Parameters
typenameThe type name as a string, e.g. "unsigned long int".

In "unsigned long int", "unsigned" and "long" are prefixes, and "int" is the suffix. The generated record is as follows:

  • The keyword is made of the first letter of the prefixes and the suffix, capitalized, e.g. "ULINT";
  • The value is random;
  • The unit is made of the first letter of the prefixes, e.g. "ul";
  • The comment is made of the first letter of the prefixes, a space, and the suffix, e.g. "ul int".