|
|
|||
File indexing completed on 2026-08-06 09:38:26
0001 // -*- C++ -*- 0002 // 0003 // Deleted.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_Deleted_H 0010 #define ThePEG_Deleted_H 0011 // This is the declaration of the Deleted and DeletedBase classes. 0012 0013 #include "ThePEG/Config/ThePEG.h" 0014 #include "InterfaceBase.h" 0015 0016 namespace ThePEG { 0017 0018 /** 0019 * The DeletedBase and its templated Deleted sub-class defines an 0020 * interface to a class derived from the InterfacedBase. It should be 0021 * used when an interface is removed to provide a user-friendly 0022 * message indicating why it was removed and possibly which interface 0023 * should be used instead. 0024 * 0025 * For each deleted interface to be defined for a class 0026 * <code>T</code>, exactly one static object of the Deleted<T> must be 0027 * created and initialized as follows: 0028 * 0029 * <code>Deleted<T> delint(name, description);</code> 0030 * 0031 * Where <code>name</code> is an identifier <code>std::string</code> which 0032 * should only contain letters [a-zA-z0-9_] and <code>description</code> is 0033 * an arbitrary <code>std::string</code> 0034 * 0035 * The <code>Deleted</code> class, as all other InterfaceBase classes 0036 * are mainly used in the BaseRepository class. 0037 * 0038 * 0039 * @see InterfacedBase 0040 * @see InterfaceBase 0041 * @see BaseRepository 0042 * 0043 */ 0044 class DeletedBase: public InterfaceBase { 0045 0046 public: 0047 0048 /** 0049 * Standard constructor. 0050 * 0051 * @param newName the name of the interface, may only contain 0052 * letters [a-zA-z0-9_]. 0053 * 0054 * @param newDescription a brief description of the interface. 0055 * 0056 * @param newClassName the name of the corresponding class. 0057 * 0058 * @param newTypeInfo the type_info object of the corresponding 0059 * class. 0060 * 0061 */ 0062 DeletedBase(string newName, string newDescription, string newClassName, 0063 const type_info & newTypeInfo) 0064 : InterfaceBase(newName, newDescription, newClassName, 0065 newTypeInfo, true, false) { 0066 rank(-1.0e10); 0067 } 0068 0069 /** 0070 * The general interface method overriding the one in 0071 * InterfaceBase. For this class, an exception will be thrown with a 0072 * message given by the description string provided in the 0073 * constructor. 0074 */ 0075 virtual string 0076 exec(InterfacedBase &ib, string action, string arguments) const 0077 ; 0078 0079 /** 0080 * Return a string describing the type of interface to be included 0081 * in the Doxygen documentation. 0082 */ 0083 virtual string doxygenType() const; 0084 0085 /** 0086 * Return a code for the type of this interface. 0087 */ 0088 virtual string type() const; 0089 0090 }; 0091 0092 /** 0093 * The DeletedBase and its templated Deleted sub-class defines an 0094 * interface to a class derived from the InterfacedBase. It should be 0095 * used when an interface is removed to provide a user-friendly 0096 * message indicating why it was removed and possibly which interface 0097 * should be used instead. 0098 * 0099 * For each deleted interface to be defined for a class 0100 * <code>T</code>, exactly one static object of the Deleted<T> must be 0101 * created and initialized as follows: 0102 * 0103 * <code>Deleted<T> delint(name, description);</code> 0104 * 0105 * Where <code>name</code> is an identifier <code>std::string</code> which 0106 * should only contain letters [a-zA-z0-9_] and <code>description</code> is 0107 * an arbitrary <code>std::string</code> 0108 * 0109 * The <code>Deleted</code> class, as all other InterfaceBase classes 0110 * are mainly used in the BaseRepository class. 0111 * 0112 * 0113 * @see InterfacedBase 0114 * @see InterfaceBase 0115 * @see BaseRepository 0116 * 0117 */ 0118 template <class T> 0119 class Deleted: public DeletedBase { 0120 0121 public: 0122 0123 /** 0124 * Standard constructor. 0125 * 0126 * @param newName the name of the interface, may only contain 0127 * letters [a-zA-z0-9_]. 0128 * 0129 * @param newDescription a brief description of the interface. 0130 * 0131 */ 0132 Deleted(string newName, string newDescription) 0133 : DeletedBase(newName, newDescription, 0134 ClassTraits<T>::className(), typeid(T)) {} 0135 0136 }; 0137 0138 } 0139 0140 #endif /* ThePEG_Deleted_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|