mini++.h
1/***************************************************************************
2 *
3 * Copyright (C) 1999 by Willem van Straten
4 * Licensed under the Academic Free License version 2.1
5 *
6 ***************************************************************************/
7// psrchive/Base/Formats/Timer/mini++.h
8
9#ifndef __MINI_PLUSPLUS_H
10#define __MINI_PLUSPLUS_H
11
12// ////////////////////////////////////////////////////////////////////
13// C++ methods that perform operations on the mini struct
14// or calculations with the mini struct
15//
16// call these functions like: Mini::load (), etc.
17//
18// ////////////////////////////////////////////////////////////////////
19
20#include <stdio.h>
21#include <string>
22
23#include "mini.h"
24#include "MJD.h"
25
26namespace Mini {
27
28 // may be used to receive soft error messages
29 extern std::string reason;
30
31 // a function to set most of mini struct to default values.
32 void init (struct mini& hdr);
33
34 // loads a mini struct, givent a file name
35 int fload (const char* fname, struct mini* hdr, bool big_endian=true);
36
37 // loads a mini struct from a file pointer
38 int load (FILE* fptr, struct mini* hdr, bool big_endian=true);
39
40 // unloads a mini struct to a file (always big endian)
41 int unload (FILE* fptr, struct mini& hdr);
42
43 // returns the MJD from a mini struct
44 MJD get_MJD (const struct mini& hdr);
45
46 // sets the MJD in a mini struct
47 void set_MJD (struct mini& hdr, const MJD& mjd);
48
49}
50
51#endif // __MINI_PLUSPLUS_H

Generated using doxygen 1.14.0