|
||||
Warning, file /include/DD4hep/NamedObject.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 // Author : M.Frank 0011 // 0012 //========================================================================== 0013 #ifndef DD4HEP_NAMEDOBJECT_H 0014 #define DD4HEP_NAMEDOBJECT_H 0015 0016 // C/C++ include files 0017 #include <string> 0018 0019 /// Namespace for the AIDA detector description toolkit 0020 namespace dd4hep { 0021 0022 /// Implementation of a named object 0023 /** 0024 * The data class behind named object handles. 0025 * 0026 * \author M.Frank 0027 * \version 1.0 0028 * \ingroup DD4HEP_CORE 0029 */ 0030 class NamedObject { 0031 public: 0032 /// The object name 0033 std::string name; 0034 /// The object type 0035 std::string type; 0036 0037 /// Initializing constructor 0038 NamedObject(const char* nam, const char* typ=""); 0039 /// Initializing constructor 0040 NamedObject(const std::string& nam); 0041 /// Initializing constructor 0042 NamedObject(const std::string& nam, const std::string& typ); 0043 0044 /// Standard constructor 0045 NamedObject() = default; 0046 /// Copy constructor 0047 NamedObject(const NamedObject& c) = default; 0048 /// Move constructor 0049 NamedObject(NamedObject&& c) = default; 0050 0051 /// Default destructor 0052 virtual ~NamedObject() = default; 0053 /// Assignment operator 0054 NamedObject& operator=(const NamedObject& c) = default; 0055 /// Move assignment operator 0056 NamedObject& operator=(NamedObject&& c) = default; 0057 /// Access name 0058 const char* GetName() const { 0059 return name.c_str(); 0060 } 0061 /// Set name (used by Handle) 0062 void SetName(const char* nam) { 0063 name = nam; 0064 } 0065 /// Set Title (used by Handle) 0066 void SetTitle(const char* tit) { 0067 type = tit; 0068 } 0069 /// Get name (used by Handle) 0070 const char* GetTitle() const { 0071 return type.c_str(); 0072 } 0073 }; 0074 0075 } /* End namespace dd4hep */ 0076 #endif // DD4HEP_NAMEDOBJECT_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |