Ignore:
Timestamp:
Mar 4, 2010, 10:34:52 AM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
b31bc4, e6a9c1
Parents:
a28a83 (diff), 57adc7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'StructureRefactoring' into MenuRefactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Descriptors/AtomDescriptor.hpp

    ra28a83 r66e95e  
    2121class AtomDescripter_impl;
    2222
     23/**
     24 * An AtomDescriptor describes a Set of Atoms from the World. Can be used for any method that needs to work on
     25 * a specific set of Atoms.
     26 *
     27 * This Class is implemented using the PIMPL-Idion, i.e. this class only contains an abstract structure
     28 * that forwards any request to a wrapped pointer-to-implementation. This way operators and calculations
     29 * on Descriptors are possible.
     30 *
     31 * Concrete Implementation Objects can be shared between multiple Wrappers, so make sure that
     32 * any Implementation remainst constant during lifetime.
     33 */
    2334class AtomDescriptor {
    2435  // close coupling to the world to allow access
     
    3243
    3344public:
    34   typedef boost::shared_ptr<AtomDescriptor_impl> impl_ptr;
     45  typedef boost::shared_ptr<AtomDescriptor_impl> impl_ptr; //!< Allow easy changes of the pointer-to-implementation type
    3546
    3647  AtomDescriptor(impl_ptr);
     48
     49  /**
     50   * Copy constructor.
     51   * Takes the Implementation from the copied object and sets it's own pointer to link there.
     52   * This way the actuall implementation object is shared between copy and original
     53   */
    3754  AtomDescriptor(const AtomDescriptor&);
    3855  ~AtomDescriptor();
    3956
     57  /**
     58   * Assignment Operator.
     59   *
     60   * Implemented by setting the pointer to the new Implementation.
     61   */
    4062  AtomDescriptor &operator=(AtomDescriptor &);
    4163
    4264protected:
     65  /**
     66   * forward Method to implementation
     67   */
    4368  atom* find();
     69
     70  /**
     71   * forward Method to implementation
     72   */
    4473  std::vector<atom*> findAll();
     74
     75  /**
     76   * Return the implementation this Wrapper currently points to.
     77   * Used for copying, assignment and in Iterators over subsets of the World.
     78   */
    4579  impl_ptr get_impl() const;
    4680
     
    4983};
    5084
    51 // Functions to construct actual descriptors
     85/**
     86 * produce an Atomdescriptor that at the point of construction contains an implementation that matches all Atoms
     87 */
    5288AtomDescriptor AllAtoms();
     89
     90/**
     91 * produce an Atomdescriptor that at the point of construction contains an implementation that matches no Atoms
     92 */
    5393AtomDescriptor NoAtoms();
    5494
    55 // no true short circuit, but the test of the second descriptor wont be done
     95/**
     96 * Set Intersection for two Atomdescriptors. The resulting Atomdescriptor will only match an Atom if both
     97 * given Atomdescriptors also match. Uses short circuit inside, so the second predicate wont be called
     98 * when the first one failed.
     99 */
    56100AtomDescriptor operator&&(const AtomDescriptor &lhs, const AtomDescriptor &rhs);
     101
     102/**
     103 * Set Union for two AtomDescriptors. The resulting AtomDescriptor will match an Atom if at least one of
     104 * the two given AtomDescriptors does match. Used short circuit inside, so the second predicate wont
     105 * be called when the first one failed.
     106 */
    57107AtomDescriptor operator||(const AtomDescriptor &lhs, const AtomDescriptor &rhs);
     108
     109/**
     110 * Set inversion for an AtomDescriptor. Matches an Atom if the given AtomDescriptor did not match.
     111 */
    58112AtomDescriptor operator!(const AtomDescriptor &arg);
    59113
Note: See TracChangeset for help on using the changeset viewer.