Action_Thermostats
        Add_AtomRandomPerturbation
        Add_RotateAroundBondAction
        Add_SelectAtomByNameAction
        Adding_Graph_to_ChangeBondActions
        Adding_MD_integration_tests
        Adding_StructOpt_integration_tests
        AutomationFragmentation_failures
        Candidate_v1.6.0
        Candidate_v1.6.1
        Candidate_v1.7.0
        ChangeBugEmailaddress
        ChangingTestPorts
        ChemicalSpaceEvaluator
        Debian_Package_split
        Debian_package_split_molecuildergui_only
        Disabling_MemDebug
        Docu_Python_wait
        EmpiricalPotential_contain_HomologyGraph_documentation
        Enhance_userguide
        Enhanced_StructuralOptimization
        Enhanced_StructuralOptimization_continued
        Example_ManyWaysToTranslateAtom
        Exclude_Hydrogens_annealWithBondGraph
        FitPartialCharges_GlobalError
        Fix_ChronosMutex
        Fix_StatusMsg
        Fix_StepWorldTime_single_argument
        Fix_Verbose_Codepatterns
        ForceAnnealing_goodresults
        ForceAnnealing_oldresults
        ForceAnnealing_tocheck
        ForceAnnealing_with_BondGraph
        ForceAnnealing_with_BondGraph_continued
        ForceAnnealing_with_BondGraph_continued_betteresults
        ForceAnnealing_with_BondGraph_contraction-expansion
        GeometryObjects
        Gui_displays_atomic_force_velocity
        IndependentFragmentGrids_IntegrationTest
        JobMarket_RobustOnKillsSegFaults
        JobMarket_StableWorkerPool
        JobMarket_unresolvable_hostname_fix
        PartialCharges_OrthogonalSummation
        PythonUI_with_named_parameters
        QtGui_reactivate_TimeChanged_changes
        Recreated_GuiChecks
        RotateToPrincipalAxisSystem_UndoRedo
        StoppableMakroAction
        TremoloParser_IncreasedPrecision
        TremoloParser_MultipleTimesteps
        Ubuntu_1604_changes
        stable
      
      
      
| Line |  | 
|---|
| 1 | /* | 
|---|
| 2 | * ParticleFactory.hpp | 
|---|
| 3 | * | 
|---|
| 4 | *  Created on: Feb 27, 2016 | 
|---|
| 5 | *      Author: heber | 
|---|
| 6 | */ | 
|---|
| 7 |  | 
|---|
| 8 |  | 
|---|
| 9 | #ifndef PARTICLEFACTORY_HPP_ | 
|---|
| 10 | #define PARTICLEFACTORY_HPP_ | 
|---|
| 11 |  | 
|---|
| 12 | // include config.h | 
|---|
| 13 | #ifdef HAVE_CONFIG_H | 
|---|
| 14 | #include <config.h> | 
|---|
| 15 | #endif | 
|---|
| 16 |  | 
|---|
| 17 | #include <string> | 
|---|
| 18 |  | 
|---|
| 19 | #include "CodePatterns/Singleton.hpp" | 
|---|
| 20 |  | 
|---|
| 21 | #include "Potentials/Particles/Particle.hpp" | 
|---|
| 22 | #include "Potentials/Particles/StreamFactory_Particle.hpp" | 
|---|
| 23 | #include "types.hpp" | 
|---|
| 24 |  | 
|---|
| 25 | class ParticleFactory : | 
|---|
| 26 | public Singleton<ParticleFactory>, | 
|---|
| 27 | public StreamFactory<Particle> | 
|---|
| 28 | { | 
|---|
| 29 | //!> make Singleton template friend | 
|---|
| 30 | friend class Singleton<ParticleFactory>; | 
|---|
| 31 |  | 
|---|
| 32 | protected: | 
|---|
| 33 |  | 
|---|
| 34 | /** Implementing function for constructing default particle, required for | 
|---|
| 35 | * StreamFactory specialization. | 
|---|
| 36 | * | 
|---|
| 37 | * \return default constructed particle | 
|---|
| 38 | */ | 
|---|
| 39 | virtual Particle* getDefaultParticle() const; | 
|---|
| 40 |  | 
|---|
| 41 | public: | 
|---|
| 42 |  | 
|---|
| 43 | /** Static function to create a single particle instance. | 
|---|
| 44 | * | 
|---|
| 45 | * \param _type this is not needed for particles | 
|---|
| 46 | * \param _input stream from which to take parameters to instantiate | 
|---|
| 47 | */ | 
|---|
| 48 | Particle * createInstance( | 
|---|
| 49 | const std::string &, | 
|---|
| 50 | std::istream &_input) const; | 
|---|
| 51 |  | 
|---|
| 52 | /** Static function to create a single particle instance. | 
|---|
| 53 | * | 
|---|
| 54 | * \param _name name of particle | 
|---|
| 55 | * \param _element represented element | 
|---|
| 56 | * \param _charge (partial) charge of this particle | 
|---|
| 57 | */ | 
|---|
| 58 | Particle * createInstance( | 
|---|
| 59 | const std::string &_name, | 
|---|
| 60 | const atomicNumber_t _element, | 
|---|
| 61 | const double _charge) const; | 
|---|
| 62 |  | 
|---|
| 63 | private: | 
|---|
| 64 | ParticleFactory () {} | 
|---|
| 65 | virtual ~ParticleFactory () {} | 
|---|
| 66 | }; | 
|---|
| 67 |  | 
|---|
| 68 | #endif /* PARTICLEFACTORY_HPP_ */ | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.