|
|
|||
File indexing completed on 2026-08-06 09:38:26
0001 // -*- C++ -*- 0002 // 0003 // ClassDocumentation.h is a part of ThePEG - Toolkit for HEP Event Generation 0004 // Copyright (C) 1999-2019 Leif Lonnblad 0005 // 0006 // ThePEG is licenced under version 3 of the GPL, see COPYING for details. 0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 0008 // 0009 #ifndef ThePEG_ClassDocumentation_H 0010 #define ThePEG_ClassDocumentation_H 0011 // This is the declaration of the ClassDocumentation class. 0012 0013 #include "ThePEG/Config/ThePEG.h" 0014 #include "ClassDocumentation.fh" 0015 0016 namespace ThePEG { 0017 0018 /** 0019 * The ClassDocumentationBase class is used to communicate 0020 * documetation about an Interfaced class to the Repository. 0021 * Similarly to classes inheriting from InterfaceBase, only one static 0022 * object of the templated ClassDocumentation, which inherits from 0023 * ClassDocumentationBase, should be created for each Interfaced 0024 * class. This object will then automatically register itself with the 0025 * static Repository. 0026 * 0027 * The ClassDocumentationBase contains three strings with information 0028 * which are all specified in the constructor: 0029 * 0030 * The <i>documentation</i> contains a brief description of the 0031 * corresponding class which can be displayed by the Repository (or 0032 * user interfaces derived from it). 0033 * 0034 * The <i>model description</i> contains a very brief description of 0035 * the model of the process implemented in the step handler, given in 0036 * the form of a LaTeX \\item. This is written to a file after a run 0037 * by an EventGenerator. 0038 * 0039 * The <i>model references</i> contains possible LaTeX \\bibitems 0040 * corresponding to \\cite commands in the <i>model 0041 * description</i>. This is also written to a file after a run by an 0042 * EventGenerator. 0043 * 0044 * @see Interfaced 0045 * @see Repository 0046 * 0047 */ 0048 class ClassDocumentationBase { 0049 0050 protected: 0051 0052 /** 0053 * The standard constructor can only be used from subclasses. 0054 * @param newDocumentation the <i>documentation</i> for the 0055 * corresponding class. 0056 * @param newModelDescription the <i>model description</i> for the 0057 * corresponding class. 0058 * @param newModelReferences the <i>model references</i> of the 0059 * corresponding class.. 0060 * @param newTypeInfo the type_info object of the corresponding 0061 * class. 0062 */ 0063 ClassDocumentationBase(string newDocumentation, 0064 string newModelDescription, 0065 string newModelReferences, 0066 const type_info & newTypeInfo); 0067 0068 public: 0069 0070 /** 0071 * The destructor. 0072 */ 0073 virtual ~ClassDocumentationBase() {} 0074 0075 public: 0076 0077 /** 0078 * Return the brief <i>documentation</i> of the corresponding class. 0079 */ 0080 string documentation() const { return theDocumentation; } 0081 0082 /** 0083 * Return the <i>model description</i> of the corresponding class. 0084 */ 0085 string modelDescription() const { return theModelDescription; } 0086 0087 /** 0088 * Return the <i>model references</i> of the corresponding class. 0089 */ 0090 string modelReferences() const { return theModelReferences; } 0091 0092 private: 0093 0094 /** 0095 * The brief <i>documentation</i> of the corresponding class. 0096 */ 0097 string theDocumentation; 0098 0099 /** 0100 * The <i>model description</i> of the corresponding class. 0101 */ 0102 string theModelDescription; 0103 0104 /** 0105 * The <i>model references</i> of the corresponding class. 0106 */ 0107 string theModelReferences; 0108 0109 private: 0110 0111 /** 0112 * Private and unimplemented default constructor. 0113 */ 0114 ClassDocumentationBase(); 0115 0116 /** 0117 * Private and unimplemented copy constructor. 0118 */ 0119 ClassDocumentationBase(const ClassDocumentationBase &); 0120 0121 /** 0122 * Private and unimplemented assignment operator. 0123 */ 0124 ClassDocumentationBase & operator=(const ClassDocumentationBase &) = delete; 0125 0126 }; 0127 0128 0129 /** 0130 * The <code>ClassDocumentation</code> class is used to communicate 0131 * documetation about an Interfaced class to the Repository. 0132 * Similarly to classes inheriting from InterfaceBase, only one static 0133 * object of the templated ClassDocumentation, which inherits from 0134 * ClassDocumentationBase, should be created for each Interfaced 0135 * class. This object will then automatically register itself with 0136 * the static Repository. 0137 * 0138 * The ClassDocumentation should in the constructor specify three 0139 * strings with information: 0140 * 0141 * The <i>documentation</i> contains a brief description of the 0142 * corresponding class which can be displayed by the Repository (or 0143 * user interfaces derived from it). 0144 * 0145 * The <i>model description</i> contains a very brief description of 0146 * the model of the process implemented in the step handler, given in 0147 * the form of a LaTeX \\item. This is written to a file after a run 0148 * by an EventGenerator. 0149 * 0150 * The <i>model references</i> contains possible LaTeX \\bibitems 0151 * corresponding to \\cite commands in the <i>model 0152 * description</i>. This is also written to a file after a run by an 0153 * EventGenerator. 0154 * 0155 * @see Interfaced 0156 * @see Repository 0157 * 0158 */ 0159 template <typename T> 0160 class ClassDocumentation: public ClassDocumentationBase { 0161 0162 public: 0163 0164 /** 0165 * The standard constructor. All other constructors are private. 0166 * @param newDocumentation the <i>documentation</i> for the 0167 * corresponding class. 0168 * @param newModelDescription the <i>model description</i> for the 0169 * corresponding class. 0170 * @param newModelReferences the <i>model references</i> of the 0171 * corresponding class.. 0172 */ 0173 ClassDocumentation(string newDocumentation, 0174 string newModelDescription = "", 0175 string newModelReferences = "") 0176 : ClassDocumentationBase(newDocumentation, newModelDescription, 0177 newModelReferences, typeid(T)) {} 0178 0179 private: 0180 0181 /** 0182 * Private and unimplemented default constructor. 0183 */ 0184 ClassDocumentation(); 0185 0186 /** 0187 * Private and unimplemented copy constructor. 0188 */ 0189 ClassDocumentation(const ClassDocumentation &); 0190 0191 /** 0192 * Private and unimplemented assignment operator. 0193 */ 0194 ClassDocumentation & operator=(const ClassDocumentation &) = delete; 0195 0196 }; 0197 0198 } 0199 0200 #endif /* ThePEG_ClassDocumentation_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|