Append.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2007 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/General/Pulsar/Append.h
10
11#ifndef _Pulsar_Append_H
12#define _Pulsar_Append_H
13
14#include "Pulsar/Archive.h"
15
16namespace Pulsar {
17
19 class Append : public Reference::Able {
20
21 public:
22
24 Append ();
25
27 virtual void init (Archive* into) { }
28
30 virtual void check (Archive* into, const Archive* from);
31
33 void append (Archive* into, const Archive* from);
34
35 bool must_match;
36
37 bool ignore_phase;
38
39 protected:
40
42 virtual bool stop (Archive* into, const Archive* from);
43
45 virtual const Archive::Match* get_mixable_policy (const Archive* into);
46
48
58 virtual void combine (Archive* into, Archive* from) = 0;
59
60 /* Internal variables that may be set by combine method */
61 bool aligned;
62 bool equal_ephemerides;
63 bool equal_models;
64 bool insert_model;
65 };
66
67}
68
69#endif
70
virtual void init(Archive *into)
Initialize an archive for appending.
Definition Append.h:27
virtual void check(Archive *into, const Archive *from)
Throw an exception if there is any reason to not call append.
Definition Append.C:65
virtual void combine(Archive *into, Archive *from)=0
Add the data in 'from' to 'into'.
virtual bool stop(Archive *into, const Archive *from)
Return true if there is a benign reason to stop.
Definition Append.C:41
void append(Archive *into, const Archive *from)
Copy the data in 'from' to 'into'.
Definition Append.C:85
virtual const Archive::Match * get_mixable_policy(const Archive *into)
Return the policy used to verify that data are mixable.
Definition Append.C:60
Append()
Default constructor.
Definition Append.C:34
Policy used to determine if two archives match.
Definition ArchiveMatch.h:21
The primary interface to pulsar observational data.
Definition Archive.h:46
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0