ExampleArchive.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2003 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/Base/Classes/Pulsar/ExampleArchive.h
10
11#ifndef __ExampleArchive_h
12#define __ExampleArchive_h
13
14#include "Pulsar/BasicArchive.h"
15#include "Pulsar/Agent.h"
16
17namespace Pulsar {
18
20
26
27 public:
28
31
33 ExampleArchive (const ExampleArchive& archive);
34
37
40
42 ExampleArchive (const Archive& archive);
43
45 void copy (const Archive& archive);
46
48 ExampleArchive* clone () const;
49
50 protected:
51
53 virtual void load_header (const char* filename);
54
56 virtual Integration*
57 load_Integration (const char* filename, unsigned index);
58
60 bool can_unload () const { return false; }
61
63 virtual void unload_file (const char* filename) const;
64
65 // Advocates the use of the ExampleArchive plugin
66 class Agent;
67
69 friend class Archive::Advocate<ExampleArchive>;
70
71 private:
72
74 void init ();
75
76 };
77
78
79 // Advocates the use of the ExampleArchive plugin
80 class ExampleArchive::Agent : public Archive::Advocate<ExampleArchive> {
81
82 public:
83
84 Agent () { }
85
87 bool advocate (const char* filename);
88
90 std::string get_name () { return "ExampleArchive"; }
91
93 std::string get_description ();
94
95 };
96
97}
98
99#endif
The primary interface to pulsar observational data.
Definition Archive.h:46
BasicArchive()
null constructor
Definition BasicArchive.C:18
virtual Integration * load_Integration(const char *filename, unsigned index)
Load a single Integration from filename, returning new instance.
Definition ExampleArchive.C:146
virtual void load_header(const char *filename)
Load the Example header information from filename.
Definition ExampleArchive.C:79
const ExampleArchive & operator=(const ExampleArchive &archive)
Assignment operator.
virtual void unload_file(const char *filename) const
Unload the ExampleArchive (header and Integration data) to filename.
Definition ExampleArchive.C:190
~ExampleArchive()
Destructor.
Definition ExampleArchive.C:26
void copy(const Archive &archive)
Copy all of the class attributes and the selected Integration data.
Definition ExampleArchive.C:49
ExampleArchive * clone() const
Return a new copy-constructed ExampleArchive instance.
Definition ExampleArchive.C:72
bool can_unload() const
The unload_file method is not implemented.
Definition ExampleArchive.h:60
ExampleArchive()
Default constructor.
Definition ExampleArchive.C:21
Array of Profiles integrated over the same time interval.
Definition Integration.h:37
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0