DADAHeader.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2024 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // dspsr/Kernel/Classes/dsp/DADAHeader.h
10 
11 #ifndef __dsp_DADAHeader_h
12 #define __dsp_DADAHeader_h
13 
14 #include "dsp/OutputFile.h"
15 
16 namespace dsp {
17 
22  class DADAHeader
23  {
24  public:
25 
30  static const unsigned default_header_size;
31 
37  void set_header(const char* ascii_header);
38 
43  const char* get_header() const { return &(header.at(0)); }
44 
49  char* get_header() { return &(header.at(0)); }
50 
59  void resize(unsigned size = 0);
60 
65  size_t size() { return header.size(); }
66 
67  protected:
68 
70  mutable std::vector<char> header;
71 
72  };
73 
74 } // namespace dsp
75 
76 #endif // !defined(__dsp_DADAHeader_h)
static const unsigned default_header_size
The default DADA ASCII header block size.
Definition: DADAHeader.h:40
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
std::vector< char > header
The ASCII header block.
Definition: DADAHeader.h:80
size_t size()
Get the current header size.
Definition: DADAHeader.h:75
void resize(unsigned size=0)
resize the header
Definition: DADAHeader.C:35
void set_header(const char *ascii_header)
Set the DADA header.
Definition: DADAHeader.C:19
const char * get_header() const
Get the immutable DADA header.
Definition: DADAHeader.h:53

Generated using doxygen 1.8.17