source: ThirdParty/mpqc_open/src/lib/util/class/class.dox@ 398fcd

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 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install 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 ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction Subpackage_levmar Subpackage_vmg ThirdParty_MPQC_rebuilt_buildsystem TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 398fcd was 860145, checked in by Frederik Heber <heber@…>, 8 years ago

Merge commit '0b990dfaa8c6007a996d030163a25f7f5fc8a7e7' as 'ThirdParty/mpqc_open'

  • Property mode set to 100644
File size: 2.0 KB
Line 
1
2/** \page class The Described Class Library
3
4The class library provides the DescribedClass base class which provides
5mechanisms that allows programmers to retrieve information about a
6DescribedClass descendant's name; parents; and default, StateIn, and KeyVal
7constructors.
8
9The special nature of described classes requires that the base class,
10DescribedClass, cannot provide everything needed. To assist the user in
11setting up described classes a helper class, ClassDesc, is provided.
12Foreach descendent of DescribedClass an object of type ClassDesc must be
13created. These objects should be static so they are initialized before
14main is entered.
15
16The ClassDesc constructor takes the following arguments:
17
18<dl>
19<dt><b>const std::type_info& typeinfo</b>
20 <dd>The type_info for this class, as returned by the C++ typeid operator.
21<dt><b>const char *name</b>
22 <dd>The name of this class.
23<dt><b>int version</b>
24 <dd>The version of this class. This is used to enable restoration
25 of objects that were saved with older versions of a class.
26 Version numbers must be 1 or greater.
27<dt><b>const char *parents</b>
28 <dd>The parents of this class. This must be given exactly
29 as it is given in the class declaration, including all
30 qualifiers.
31<dt><b>DescribedClass* (*ctor)()</b>
32 <dd>A function that creates an object of this type using the
33 default constructor. The default is 0 (meaning that no
34 constructor is available.
35<dt><b>DescribedClass* (*keyval_ctor)(const Ref<KeyVal>&)</b>
36 <dd>A function that creates an object of this type using the
37 KeyVal constructor. The default is 0.
38<dt><b>DescribedClass* (*statein_ctor)(StateIn&)</b>
39 <dd>A function that creates an object of this type using the
40 StateIn constructor. The default is 0.
41</dl>
42
43For example, consider the class, D:
44
45<pre>
46class D: public B, public C {
47 public:
48 D();
49};
50</pre>
51
52The file implementing D would contain the following line:
53
54<pre>
55static ClassDesc D_cd(typeid(D),"D",1,"public B, public C",create\<D\>);
56</pre>
57
58*/
Note: See TracBrowser for help on using the repository browser.