PSCF v1.5.0
TrajectoryReaderFactory.h
1#ifndef RP_TRAJECTORY_READER_FACTORY_H
2#define RP_TRAJECTORY_READER_FACTORY_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2026, David Morse (morse012@um.edu) and co-authors
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <util/param/Factory.h> // base class template
12#include <rp/fts/trajectory/TrajectoryReader.h> // template argument
13
14#include <pscf/backend/TmplDeclare.h>
15#include <string>
16
17// Forward declarations
18namespace Pscf {
19 namespace Rp {
20 template <int D, class T> class System;
21 }
22}
23
24namespace Pscf {
25namespace Rp {
26
27 using namespace Util;
28
34 template <int D, class T>
35 class TrajectoryReaderFactory
36 : public Factory< TrajectoryReader<D,T> >
37 {
38
39 public:
40
41 /*
42 * Constructor.
43 *
44 * \param system parent system object
45 */
46 TrajectoryReaderFactory(System<D,T>& system);
47
54 TrajectoryReader<D,T>* factory(const std::string &className) const;
55
57
58 private:
59
61 System<D,T>* sysPtr_;
62
63 };
64
65 // Explicit instantiation declarations
66 PSCF_TMPL_DECLARE(TrajectoryReaderFactory)
67
68}
69}
70#endif
Base class template for classes that represent a complete system.
Factory for subclasses of TrajectoryReader.
TrajectoryReader< D, T > * factory(const std::string &className) const
Create and instance of a specified subclass of TrajectoryReader.
Trajectory file reader (abstract base class).
TrajectoryReader< D, T > * trySubfactories(const std::string &className) const
Definition Factory.h:427
Code for programs that simulate real-valued periodic fields.
Definition param_pc.dox:2
PSCF package top-level namespace.