PSCF v1.5.0
rp/scft/iterator/IteratorFactory.h
1#ifndef RP_ITERATOR_FACTORY_H
2#define RP_ITERATOR_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/scft/iterator/Iterator.h> // class template argument
13#include <pscf/backend/TmplDeclare.h> // declaration macros
14
15#include <string>
16
17// Forward declaration
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
35 template <int D, class T>
36 class IteratorFactory : public Factory< Iterator<D,T> >
37 {
38
39 public:
40
47
54 Iterator<D,T>* factory(const std::string &className) const;
55
56 // Inherited member functions
59
60 private:
61
63 System<D,T>* sysPtr_;
64
65 };
66
67 // Explicit instantation declarations
68 PSCF_TMPL_DECLARE(IteratorFactory)
69
70}
71}
72#endif
Factory for subclasses of Iterator.
IteratorFactory(System< D, T > &system)
Constructor.
Iterator< D, T > * factory(const std::string &className) const
Create an instance of a specified subclass of Iterator<D,T>.
Base class template for iterative solvers for SCF equations.
Base class template for classes that represent a complete system.
Iterator< D, T > * trySubfactories(const std::string &className) const
Definition Factory.h:427
Iterator< D, T > * readObjectOptional(std::istream &in, ParamComposite &parent, std::string &className, bool &isEnd)
Definition Factory.h:380
Code for programs that simulate real-valued periodic fields.
Definition param_pc.dox:2
PSCF package top-level namespace.