DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NamedObject.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation for LCD
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 
14 #ifndef DD4HEP_GEOMETRY_INTERNAL_NAMEDOBJECT_H
15 #define DD4HEP_GEOMETRY_INTERNAL_NAMEDOBJECT_H
16 
17 // C/C++ include files
18 #include <string>
19 
21 namespace DD4hep {
22 
24 
31  class NamedObject {
32  public:
34  std::string name;
36  std::string type;
37 
39  NamedObject();
41  NamedObject(const char* nam, const char* typ="");
43  NamedObject(const std::string& nam);
45  NamedObject(const std::string& nam, const std::string& typ);
47  NamedObject(const NamedObject& c);
49  virtual ~NamedObject();
52 
54  const char* GetName() const {
55  return name.c_str();
56  }
58  void SetName(const char* nam) {
59  name = nam;
60  }
62  void SetTitle(const char* tit) {
63  type = tit;
64  }
66  const char* GetTitle() const {
67  return type.c_str();
68  }
69  };
70 
71 } /* End namespace DD4hep */
72 #endif /* DD4HEP_GEOMETRY_INTERNAL_NAMEDOBJECT_H */
void SetName(const char *nam)
Set name (used by Handle)
Definition: NamedObject.h:58
const char * GetTitle() const
Get name (used by Handle)
Definition: NamedObject.h:66
NamedObject()
Standard constructor.
Definition: NamedObject.cpp:27
Implementation of a named object.
Definition: NamedObject.h:31
std::string name
The object name.
Definition: NamedObject.h:34
void SetTitle(const char *tit)
Set Title (used by Handle)
Definition: NamedObject.h:62
NamedObject & operator=(const NamedObject &c)
Assignment operator.
Definition: NamedObject.cpp:57
std::string type
The object type.
Definition: NamedObject.h:36
const char * GetName() const
Access name.
Definition: NamedObject.h:54
virtual ~NamedObject()
Default destructor.
Definition: NamedObject.cpp:53