Logo ROOT  
Reference Guide
TEnumConstant.cxx
Go to the documentation of this file.
1 // @(#)root/meta:$Id$
2 // Author: Bianca-Cristina Cristescu 10/07/13
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 /** \class TEnumConstant
13 The TEnumConstant class implements the constants of the enum type.
14 */
15 
16 #include "TEnumConstant.h"
17 #include "TEnum.h"
18 
19 
21 
22 ////////////////////////////////////////////////////////////////////////////////
23 /// Constructor of the TEnumConstant.
24 /// Takes as parameters DataMemberInfo, value, and enum type.
25 
26 TEnumConstant::TEnumConstant(DataMemberInfo_t *info, const char* name, Long64_t value, TEnum* type)
27  : TGlobal(info), fEnum(type), fValue(value) {
28  //Set name of constant
29  this->SetName(name);
30 
31  // Add the constant to the enum type.
32  type->AddConstant(this);
33 }
34 
35 ////////////////////////////////////////////////////////////////////////////////
36 ///Destructor
37 
39 {
40 }
TNamed::SetName
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
TEnumConstant.h
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TGlobal
Definition: TGlobal.h:28
TEnum.h
TEnum
Definition: TEnum.h:33
TEnumConstant
Definition: TEnumConstant.h:29
TEnumConstant::~TEnumConstant
virtual ~TEnumConstant()
Destructor.
Definition: TEnumConstant.cxx:38
name
char name[80]
Definition: TGX11.cxx:110
type
int type
Definition: TGX11.cxx:121
TEnumConstant::TEnumConstant
TEnumConstant()
Definition: TEnumConstant.h:35