CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
edm::TypeWithDict Class Reference

#include <TypeWithDict.h>

Public Member Functions

void * allocate () const
 
size_t arrayDimension () const
 
size_t arrayLength () const
 
ObjectWithDict construct () const
 
std::string cppName () const
 
MemberWithDict dataMemberByName (std::string const &) const
 
size_t dataMemberSize () const
 
void deallocate (void *address) const
 
void destruct (void *address, bool dealloc=true) const
 
TypeWithDict finalType () const
 
std::string friendlyClassName () const
 
FunctionWithDict functionMemberByName (std::string const &) const
 
FunctionWithDict functionMemberByName (std::string const &name, std::string const &proto, bool isConst) const
 
size_t functionMemberSize () const
 
int getBaseClassOffset (TypeWithDict const &baseClass) const
 
TClass * getClass () const
 
TDataType * getDataType () const
 
TEnum * getEnum () const
 
long getProperty () const
 
bool hasBase (std::string const &) const
 
bool hasBase (TypeWithDict const &basety) const
 
bool invalidTypeInfo () const
 
bool isArray () const
 
bool isClass () const
 
bool isConst () const
 
bool isEnum () const
 
bool isFundamental () const
 
bool isPointer () const
 
bool isReference () const
 
bool isTemplateInstance () const
 
bool isTypedef () const
 
bool isVirtual () const
 
size_t maximumIndex (size_t dim) const
 
std::string name () const
 
TypeWithDict nestedType (char const *) const
 
TypeWithDict nestedType (std::string const &) const
 
 operator bool () const
 
TypeWithDictoperator= (TypeWithDict const &)
 
void const * pointerToBaseType (void const *ptr, TypeWithDict const &derivedType) const
 
void const * pointerToContainedType (void const *ptr, TypeWithDict const &derivedType) const
 
void print (std::ostream &os) const
 
std::string qualifiedName () const
 
size_t size () const
 
int stringToEnumValue (std::string const &) const
 
TypeWithDictstripConstRef ()
 
TypeWithDict templateArgumentAt (size_t index) const
 
std::string templateName () const
 
TypeWithDict toType () const
 
std::type_info const & typeInfo () const
 
 TypeWithDict ()
 
 TypeWithDict (TypeWithDict const &)
 
 TypeWithDict (TClass *type)
 
 TypeWithDict (TEnum *type)
 
 TypeWithDict (std::type_info const &)
 
 TypeWithDict (TMethodArg *arg)
 
std::string unscopedName () const
 
std::type_info const & unvalidatedTypeInfo () const
 
std::string userClassName () const
 

Static Public Member Functions

static TypeWithDict byName (std::string const &name)
 
static TypeWithDict byTypeInfo (std::type_info const &ti)
 

Private Types

enum  dummyType
 
typedef dummyType ** invalidType
 

Private Member Functions

 TypeWithDict (std::type_info const &, long property)
 
 TypeWithDict (TClass *type, long property)
 
 TypeWithDict (TEnum *type, long property)
 
 TypeWithDict (TMethodArg *arg, long property)
 

Static Private Member Functions

static TypeWithDict byName (std::string const &name, long property)
 

Private Attributes

value_ptr< std::vector< size_t > > arrayDimensions_
 
TClass * class_
 
TDataType * dataType_
 
TEnum * enum_
 
long property_
 
std::type_info const * ti_
 

Friends

bool operator== (TypeWithDict const &, std::type_info const &)
 
class TypeBases
 
class TypeDataMembers
 
class TypeFunctionMembers
 

Detailed Description

Definition at line 38 of file TypeWithDict.h.

Member Typedef Documentation

Definition at line 44 of file TypeWithDict.h.

Member Enumeration Documentation

Definition at line 43 of file TypeWithDict.h.

43 {} dummyType; // Tag for valid type, but no type_info information

Constructor & Destructor Documentation

edm::TypeWithDict::TypeWithDict ( )

Definition at line 238 of file TypeWithDict.cc.

Referenced by finalType(), templateArgumentAt(), and toType().

239  : ti_(&typeid(TypeWithDict::invalidType)),
240  class_(nullptr),
241  enum_(nullptr),
242  dataType_(nullptr),
243  arrayDimensions_(nullptr),
244  property_(0L) {}
dummyType ** invalidType
Definition: TypeWithDict.h:44
TDataType * dataType_
Definition: TypeWithDict.h:49
std::type_info const * ti_
Definition: TypeWithDict.h:46
value_ptr< std::vector< size_t > > arrayDimensions_
Definition: TypeWithDict.h:50
edm::TypeWithDict::TypeWithDict ( TypeWithDict const &  rhs)

Definition at line 246 of file TypeWithDict.cc.

247  : ti_(rhs.ti_),
248  class_(rhs.class_),
249  enum_(rhs.enum_),
250  dataType_(rhs.dataType_),
251  arrayDimensions_(rhs.arrayDimensions_),
252  property_(rhs.property_) {}
TDataType * dataType_
Definition: TypeWithDict.h:49
std::type_info const * ti_
Definition: TypeWithDict.h:46
value_ptr< std::vector< size_t > > arrayDimensions_
Definition: TypeWithDict.h:50
edm::TypeWithDict::TypeWithDict ( TClass *  type)
explicit

Definition at line 316 of file TypeWithDict.cc.

edm::TypeWithDict::TypeWithDict ( TEnum *  type)
explicit

Definition at line 330 of file TypeWithDict.cc.

330 : TypeWithDict(enm, 0L) {}
edm::TypeWithDict::TypeWithDict ( std::type_info const &  ti)
explicit

Definition at line 275 of file TypeWithDict.cc.

edm::TypeWithDict::TypeWithDict ( TMethodArg *  arg)
explicit

Definition at line 340 of file TypeWithDict.cc.

edm::TypeWithDict::TypeWithDict ( std::type_info const &  ti,
long  property 
)
explicitprivate

Definition at line 277 of file TypeWithDict.cc.

References byName(), class_, edm::TypeID::className(), dataType_, enum_, name(), and edm::throwTypeException().

278  : ti_(&ti),
279  class_(TClass::GetClass(ti)),
280  enum_(nullptr),
281  dataType_(TDataType::GetDataType(TDataType::GetType(ti))),
282  arrayDimensions_(nullptr),
283  property_(property) {
284  if (class_ != nullptr) {
285  return;
286  }
287 
288  // Handle pointers and arrays
289  // Must be done before dataType_ is checked, because dataType_ will be filled for char*
290  char lastChar = TypeID(*ti_).className().back();
291  if (lastChar == '*' || lastChar == ']') {
292  *this = TypeWithDict::byName(TypeID(*ti_).className());
293  return;
294  }
295 
296  if (dataType_ != nullptr) {
297  return;
298  }
299 
300  enum_ = TEnum::GetEnum(ti, TEnum::kAutoload);
301  if (enum_ != nullptr) {
302  return;
303  }
304 
305  if (ti == typeid(void)) {
306  // For some reason, "void" has a data type if accessed by name, but not by type_info.
307  dataType_ = gROOT->GetType("void");
308  return;
309  }
310 
311  // std::cerr << "DEBUG BY TI: " << name() << std::endl;
312 
313  throwTypeException("TypeWithDict): ", name());
314  }
static void throwTypeException(std::string const &function, std::string const &typeName)
Definition: TypeWithDict.cc:48
TDataType * dataType_
Definition: TypeWithDict.h:49
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:74
std::string name() const
std::type_info const * ti_
Definition: TypeWithDict.h:46
value_ptr< std::vector< size_t > > arrayDimensions_
Definition: TypeWithDict.h:50
edm::TypeWithDict::TypeWithDict ( TClass *  type,
long  property 
)
explicitprivate

Definition at line 318 of file TypeWithDict.cc.

References ti_.

319  : ti_(cl->GetTypeInfo()),
320  class_(cl),
321  enum_(nullptr),
322  dataType_(nullptr),
323  arrayDimensions_(nullptr),
324  property_(property) {
325  if (ti_ == nullptr) {
326  ti_ = &typeid(TypeWithDict::dummyType);
327  }
328  }
TDataType * dataType_
Definition: TypeWithDict.h:49
std::type_info const * ti_
Definition: TypeWithDict.h:46
value_ptr< std::vector< size_t > > arrayDimensions_
Definition: TypeWithDict.h:50
edm::TypeWithDict::TypeWithDict ( TEnum *  type,
long  property 
)
explicitprivate

Definition at line 332 of file TypeWithDict.cc.

333  : ti_(&typeid(TypeWithDict::dummyType)),
334  class_(nullptr),
335  enum_(enm),
336  dataType_(nullptr),
337  arrayDimensions_(nullptr),
338  property_(property) {}
TDataType * dataType_
Definition: TypeWithDict.h:49
std::type_info const * ti_
Definition: TypeWithDict.h:46
value_ptr< std::vector< size_t > > arrayDimensions_
Definition: TypeWithDict.h:50
edm::TypeWithDict::TypeWithDict ( TMethodArg *  arg,
long  property 
)
explicitprivate

Definition at line 342 of file TypeWithDict.cc.

343  : TypeWithDict(byName(arg->GetTypeName(), arg->Property() | property)) {}
A arg
Definition: Factorize.h:38
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:74

Member Function Documentation

void * edm::TypeWithDict::allocate ( ) const

Definition at line 787 of file TypeWithDict.cc.

References size().

Referenced by reco::parser::ExpressionVar::makeStorage(), and unvalidatedTypeInfo().

787 { return new char[size()]; }
size_t size() const
size_t edm::TypeWithDict::arrayDimension ( ) const

Definition at line 518 of file TypeWithDict.cc.

References arrayDimensions_, and isArray().

Referenced by arrayLength(), name(), and unvalidatedTypeInfo().

518  {
519  assert(isArray());
520  return arrayDimensions_->size();
521  }
bool isArray() const
value_ptr< std::vector< size_t > > arrayDimensions_
Definition: TypeWithDict.h:50
size_t edm::TypeWithDict::arrayLength ( ) const

Definition at line 509 of file TypeWithDict.cc.

References arrayDimension(), mps_fire::i, isArray(), and maximumIndex().

Referenced by size(), and unvalidatedTypeInfo().

509  {
510  assert(isArray());
511  size_t theLength = 1;
512  for (size_t i = 0; i < arrayDimension(); ++i) {
513  theLength *= maximumIndex(i);
514  }
515  return theLength;
516  }
size_t maximumIndex(size_t dim) const
size_t arrayDimension() const
bool isArray() const
TypeWithDict edm::TypeWithDict::byName ( std::string const &  name)
static

Definition at line 74 of file TypeWithDict.cc.

References dttmaxenums::L.

Referenced by byName(), edm::checkClassDictionaries(), edm::ProductRegistry::checkDictionariesOfConsumedTypes(), edm::checkDictionary(), edm::checkDictionaryOfWrappedType(), BareRootProductGetter::createNewBuffer(), edm::FunctionWithDict::finalReturnType(), FWFileEntry::getBranchName(), fwlite::DataGetterHelper::getByBranchDescription(), edm::EventBase::getByLabel(), edm::productholderindexhelper::getContainedType(), edm::root::FWLiteDelayedReader::getTheProduct(), edm::BranchDescription::initFromDictionary(), edm::service::InitRootHandlers::InitRootHandlers(), edm::insertSelectedProcesses(), edm::loadCap(), FWParameterSetterBase::makeSetterFor(), reco::parser::ExpressionVar::makeStorage(), nestedType(), FWFileEntry::runFilter(), FWModelExpressionSelector::select(), FWModelFilter::setClassName(), FWExpressionEvaluator::setClassName(), edm::setIsMergeable(), edm::MergeableRunProductProcesses::setProcessesWithMergeableRunProducts(), FWTableViewManager::tableFormats(), templateArgumentAt(), edm::MemberWithDict::typeOf(), and TypeWithDict().

74  {
75  // This is a public static function.
76  auto const& item = typeMap.find(name);
77  if (item != typeMap.end()) {
78  return item->second;
79  }
81  typeMap.insert(std::make_pair(name, theType));
82  return theType;
83  }
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:74
std::string name() const
TypeWithDict edm::TypeWithDict::byName ( std::string const &  name,
long  property 
)
staticprivate

Definition at line 85 of file TypeWithDict.cc.

References arrayDimensions_, begin, diMuonSkim_cfi::byName, byName(), KineDebug3::count(), SiPixelPhase1DigisV_cfi::dimensions, end, edm::first(), dttmaxenums::L, property_, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and edm::stripNamespace().

85  {
86  // This is a private static function.
87 
88  static std::string const constPrefix("const ");
89  static std::string const constSuffix(" const");
90  static size_t const constPrefixSize(constPrefix.size());
91  static size_t const constSuffixSize(constSuffix.size());
92 
93  // Handle references
94  if (name.back() == '&') {
95  assert(property == 0L);
96  property |= kIsReference;
97  return byName(name.substr(0, name.size() - 1), property);
98  }
99 
100  // Handle const qualifier
101  if (name.size() > constSuffixSize && name.back() != '*') {
102  if (name.substr(0, constPrefixSize) == constPrefix) {
103  property |= kIsConstant;
104  return byName(name.substr(constPrefixSize), property);
105  }
106  if (name.substr(name.size() - constSuffixSize) == constSuffix) {
107  property |= kIsConstant;
108  return byName(name.substr(0, name.size() - constSuffixSize), property);
109  }
110  }
111 
112  // Handle pointers
113  if (name.back() == '*') {
114  // pointer to pointer not supported
115  assert(!(property & (long)kIsPointer));
116  // C-style array of pointers is not supported
117  assert(!(property & (long)kIsArray));
118  property |= kIsPointer;
119  if (property & (long)kIsConstant) {
120  property &= ~((long)kIsConstant);
121  property |= kIsConstPointer;
122  }
123  return byName(name.substr(0, name.size() - 1), property);
124  }
125 
126  // Handle C-style arrays
127  if (name.back() == ']') {
128  // pointer to array not supported
129  assert(!(property & (long)kIsPointer));
130  // Protect against the remote possibility of '[' nested in a class type
131  size_t begin = name.find_last_of("<>:,()");
132  if (begin == std::string::npos) {
133  begin = 0;
134  } else {
135  ++begin;
136  }
137  size_t first = name.find('[', begin);
138  assert(first != std::string::npos);
139  assert(first != 0);
140  TypeWithDict ret = TypeWithDict::byName(name.substr(0, first), property);
141  ret.property_ |= kIsArray;
142  ret.arrayDimensions_ = value_ptr<std::vector<size_t> >(new std::vector<size_t>);
143  std::string const dimensions = name.substr(first);
144  char const* s = dimensions.c_str();
145  while (true) {
146  size_t x = 0;
147  int count = sscanf(s, "[%lu]", &x);
148  assert(count == 1);
149  ret.arrayDimensions_->push_back(x);
150  ++s;
151  while (*s != '\0' && *s != '[') {
152  ++s;
153  }
154  if (*s == '\0') {
155  break;
156  }
157  }
158  return ret;
159  }
160 
161  // Handle classes
162  TClass* theClass = TClass::GetClass(name.c_str());
163  if (theClass != nullptr) {
164  return TypeWithDict(theClass, property);
165  }
166 
167  // Handle enums
168  TEnum* theEnum = TEnum::GetEnum(name.c_str(), TEnum::kAutoload);
169  if (theEnum) {
170  return TypeWithDict(theEnum, property);
171  }
172 
173  // Handle built-ins
174  TDataType* theDataType = gROOT->GetType(name.c_str());
175  if (theDataType) {
176  switch (theDataType->GetType()) {
177  case kUInt_t:
178  return TypeWithDict(typeid(unsigned int), property);
179  case kInt_t:
180  return TypeWithDict(typeid(int), property);
181  case kULong_t:
182  return TypeWithDict(typeid(unsigned long), property);
183  case kLong_t:
184  return TypeWithDict(typeid(long), property);
185  case kULong64_t:
186  return TypeWithDict(typeid(unsigned long long), property);
187  case kLong64_t:
188  return TypeWithDict(typeid(long long), property);
189  case kUShort_t:
190  return TypeWithDict(typeid(unsigned short), property);
191  case kShort_t:
192  return TypeWithDict(typeid(short), property);
193  case kUChar_t:
194  return TypeWithDict(typeid(unsigned char), property);
195  case kChar_t:
196  return TypeWithDict(typeid(char), property);
197  case kBool_t:
198  return TypeWithDict(typeid(bool), property);
199  case kFloat_t:
200  return TypeWithDict(typeid(float), property);
201  case kFloat16_t:
202  return TypeWithDict(typeid(Float16_t), property);
203  case kDouble_t:
204  return TypeWithDict(typeid(double), property);
205  case kDouble32_t:
206  return TypeWithDict(typeid(Double32_t), property);
207  case kCharStar:
208  return TypeWithDict(typeid(char*), property);
209  case kDataTypeAliasSignedChar_t:
210  return TypeWithDict(typeid(signed char), property);
211  }
212  }
213 
214  if (name == "void") {
215  return TypeWithDict(typeid(void), property);
216  }
217 
218  // For a reason not understood, TClass::GetClass sometimes cannot find std::type_info
219  // by name. This simple workaround bypasses the problem.
220  // The problem really should be debugged. (testORA12)
221  if (name == "std::type_info") {
222  return TypeWithDict(typeid(std::type_info), property);
223  }
224 
225  // For a reason not understood, TClass::GetClass sometimes cannot find std::vector<T>::value_type
226  // when T is a nested class.
227  if (stripNamespace(name) == "value_type") {
228  size_t begin = name.find('<');
229  size_t end = name.rfind('>');
230  if (begin != std::string::npos && end != std::string::npos && end > ++begin) {
231  return TypeWithDict::byName(name.substr(begin, end - begin), property);
232  }
233  }
234  //std::cerr << "DEBUG BY NAME: " << name << std::endl;
235  return TypeWithDict();
236  }
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:74
std::string name() const
#define end
Definition: vmac.h:39
std::string stripNamespace(std::string const &theName)
Definition: TypeID.cc:90
#define begin
Definition: vmac.h:32
T first(std::pair< T, U > const &p)
TypeWithDict edm::TypeWithDict::byTypeInfo ( std::type_info const &  ti)
static

Definition at line 62 of file TypeWithDict.cc.

References dttmaxenums::L.

Referenced by edm::ObjectWithDict::dynamicType().

62  {
63  // This is a public static function.
64  auto index = std::type_index(ti);
65  auto const& item = typeIndexMap.find(index);
66  if (item != typeIndexMap.end()) {
67  return item->second;
68  }
69  TypeWithDict theType(ti, 0L);
70  typeIndexMap.insert(std::make_pair(index, theType));
71  return theType;
72  }
ObjectWithDict edm::TypeWithDict::construct ( ) const

Definition at line 791 of file TypeWithDict.cc.

References class_, isClass(), and size().

Referenced by edm::ObjectWithDict::byType(), and unvalidatedTypeInfo().

791  {
792  if (isClass()) {
793  return ObjectWithDict(*this, class_->New());
794  }
795  return ObjectWithDict(*this, new char[size()]);
796  }
bool isClass() const
size_t size() const
std::string edm::TypeWithDict::cppName ( ) const

Definition at line 433 of file TypeWithDict.cc.

References qualifiedName(), edm::replaceString(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by unvalidatedTypeInfo().

433  {
434  std::string cName = qualifiedName();
435  // Get rid of silly ROOT typedefs
436  replaceString(cName, "ULong64_t", "unsigned long long");
437  replaceString(cName, "Long64_t", "long long");
438  return cName;
439  }
void replaceString(std::string &demangledName, std::string const &from, std::string const &to)
std::string qualifiedName() const
MemberWithDict edm::TypeWithDict::dataMemberByName ( std::string const &  member) const

Definition at line 572 of file TypeWithDict.cc.

References haddnano::cl, class_, enum_, isClass(), and isEnum().

Referenced by reco::findDataMember(), edm::ObjectWithDict::get(), and unvalidatedTypeInfo().

572  {
573  if (isClass()) {
574  TDataMember* dataMember = class_->GetDataMember(member.c_str());
575  if (dataMember == nullptr) {
576  // Look for indirect data members
577  TRealData* realDataMember = class_->GetRealData(member.c_str());
578  if (realDataMember != nullptr) {
579  dataMember = realDataMember->GetDataMember();
580  }
581  }
582  return MemberWithDict(dataMember);
583  }
584  if (isEnum()) {
585  TClass* cl = enum_->GetClass();
586  return MemberWithDict(cl->GetDataMember(member.c_str()));
587  }
588  return MemberWithDict();
589  }
bool isEnum() const
bool isClass() const
size_t edm::TypeWithDict::dataMemberSize ( ) const

Definition at line 528 of file TypeWithDict.cc.

References class_, enum_, isClass(), and isEnum().

Referenced by reco::parser::AnyMethodArgumentFixup::operator()(), and unvalidatedTypeInfo().

528  {
529  if (isClass()) {
530  return class_->GetListOfDataMembers()->GetSize();
531  }
532  if (isEnum()) {
533  return enum_->GetConstants()->GetSize();
534  }
535  return 0;
536  }
bool isEnum() const
bool isClass() const
void edm::TypeWithDict::deallocate ( void *  address) const

Definition at line 789 of file TypeWithDict.cc.

Referenced by reco::parser::ExpressionVar::delStorage(), and unvalidatedTypeInfo().

789 { delete[] reinterpret_cast<char*>(address); }
void edm::TypeWithDict::destruct ( void *  address,
bool  dealloc = true 
) const

Definition at line 798 of file TypeWithDict.cc.

References class_, and isClass().

Referenced by FWParameterSetterBase::makeSetterFor(), and unvalidatedTypeInfo().

798  {
799  if (isClass()) {
800  class_->Destructor(address, !dealloc);
801  return;
802  }
803  if (dealloc) {
804  delete[] reinterpret_cast<char*>(address);
805  }
806  }
bool isClass() const
TypeWithDict edm::TypeWithDict::finalType ( ) const

Definition at line 623 of file TypeWithDict.cc.

References isClass(), isFundamental(), ti_, and TypeWithDict().

Referenced by reco::findMethod(), and unvalidatedTypeInfo().

623  {
624  if (*ti_ == typeid(invalidType)) {
625  return TypeWithDict();
626  }
627  if (!isClass() && !isFundamental()) {
628  return *this;
629  }
630  return TypeWithDict(*ti_);
631  }
dummyType ** invalidType
Definition: TypeWithDict.h:44
std::type_info const * ti_
Definition: TypeWithDict.h:46
bool isClass() const
bool isFundamental() const
std::string edm::TypeWithDict::friendlyClassName ( ) const

Definition at line 490 of file TypeWithDict.cc.

References edm::friendlyname::friendlyName(), and name().

Referenced by unvalidatedTypeInfo().

490 { return friendlyname::friendlyName(name()); }
std::string name() const
std::string friendlyName(std::string const &iFullName)
FunctionWithDict edm::TypeWithDict::functionMemberByName ( std::string const &  member) const

Definition at line 591 of file TypeWithDict.cc.

References class_, isClass(), and TtSemiLepEvtBuilder_cfi::meth.

Referenced by reco::findMethod(), and unvalidatedTypeInfo().

591  {
592  if (!isClass()) {
593  return FunctionWithDict();
594  }
595  TMethod* meth = reinterpret_cast<TMethod*>(class_->GetListOfMethods()->FindObject(member.c_str()));
596  if (meth == nullptr) {
597  return FunctionWithDict();
598  }
599  return FunctionWithDict(meth);
600  }
bool isClass() const
FunctionWithDict edm::TypeWithDict::functionMemberByName ( std::string const &  name,
std::string const &  proto,
bool  isConst 
) const

Definition at line 602 of file TypeWithDict.cc.

References class_, isClass(), isConst(), crabWrapper::key, TtSemiLepEvtBuilder_cfi::meth, name(), and AlCaHLTBitMon_QueryRunRegistry::string.

604  {
605  if (!isClass()) {
606  return FunctionWithDict();
607  }
608  std::string const& key = name() + '#' + functionName + '#' + proto;
609  auto const& item = functionMap.find(key);
610  if (item != functionMap.end()) {
611  return item->second;
612  }
613  TMethod* meth = class_->GetMethodWithPrototype(
614  functionName.c_str(), proto.c_str(), /*objectIsConst=*/isConst, /*mode=*/ROOT::kConversionMatch);
615  if (meth == nullptr) {
616  return FunctionWithDict();
617  }
618  FunctionWithDict theFunction = FunctionWithDict(meth);
619  functionMap.insert(std::make_pair(key, theFunction));
620  return theFunction;
621  }
bool isConst() const
std::string name() const
bool isClass() const
size_t edm::TypeWithDict::functionMemberSize ( ) const

Definition at line 538 of file TypeWithDict.cc.

References class_, and isClass().

Referenced by unvalidatedTypeInfo().

538  {
539  if (isClass()) {
540  return class_->GetListOfMethods()->GetSize();
541  }
542  return 0;
543  }
bool isClass() const
int edm::TypeWithDict::getBaseClassOffset ( TypeWithDict const &  baseClass) const

Definition at line 761 of file TypeWithDict.cc.

References class_, Exception, isClass(), edm::errors::LogicError, name(), and PFRecoTauDiscriminationByIsolation_cfi::offset.

Referenced by edm::ObjectWithDict::castObject(), FWSimpleProxyHelper::itemChanged(), pointerToBaseType(), and unvalidatedTypeInfo().

761  {
762  if (!isClass()) {
763  throw Exception(errors::LogicError) << "Function TypeWithDict::getBaseClassOffset(), type\n"
764  << name() << "\nis not a class\n";
765  }
766  if (baseClass.class_ == nullptr) {
767  throw Exception(errors::LogicError) << "Function TypeWithDict::getBaseClassOffset(), base type\n"
768  << name() << "\nis not a class\n";
769  }
770  int offset = class_->GetBaseClassOffset(baseClass.class_);
771  return offset;
772  }
std::string name() const
bool isClass() const
TClass * edm::TypeWithDict::getClass ( ) const
TDataType * edm::TypeWithDict::getDataType ( ) const

Definition at line 394 of file TypeWithDict.cc.

References dataType_, isArray(), and isPointer().

Referenced by unvalidatedTypeInfo().

394  {
395  if (isPointer() || isArray()) {
396  return nullptr;
397  }
398  return dataType_;
399  }
TDataType * dataType_
Definition: TypeWithDict.h:49
bool isArray() const
bool isPointer() const
TEnum * edm::TypeWithDict::getEnum ( ) const

Definition at line 387 of file TypeWithDict.cc.

References enum_, isArray(), and isPointer().

Referenced by unvalidatedTypeInfo().

387  {
388  if (isPointer() || isArray()) {
389  return nullptr;
390  }
391  return enum_;
392  }
bool isArray() const
bool isPointer() const
long edm::TypeWithDict::getProperty ( ) const

Definition at line 401 of file TypeWithDict.cc.

References property_.

Referenced by unvalidatedTypeInfo().

401 { return property_; }
bool edm::TypeWithDict::hasBase ( std::string const &  basename) const

Definition at line 736 of file TypeWithDict.cc.

References haddnano::cl, class_, and isClass().

Referenced by edm::ObjectWithDict::castObject(), and unvalidatedTypeInfo().

736  {
737  if (!isClass()) {
738  return false;
739  }
740  TClass* cl = class_->GetBaseClass(basename.c_str());
741  if (cl != nullptr) {
742  return true;
743  }
744  return false;
745  }
bool isClass() const
bool edm::TypeWithDict::hasBase ( TypeWithDict const &  basety) const

Definition at line 747 of file TypeWithDict.cc.

References haddnano::cl, class_, isClass(), and name().

747  {
748  if (!isClass()) {
749  return false;
750  }
751  if (basety.class_ == nullptr) {
752  return false;
753  }
754  TClass* cl = class_->GetBaseClass(basety.name().c_str());
755  if (cl != nullptr) {
756  return true;
757  }
758  return false;
759  }
bool isClass() const
bool edm::TypeWithDict::invalidTypeInfo ( ) const

Definition at line 355 of file TypeWithDict.cc.

References isArray(), isPointer(), and ti_.

Referenced by edm::checkClassDictionaries(), and edm::checkDictionary().

355 { return *ti_ == typeid(dummyType) || isPointer() || isArray(); }
bool isArray() const
std::type_info const * ti_
Definition: TypeWithDict.h:46
bool isPointer() const
bool edm::TypeWithDict::isArray ( ) const
bool edm::TypeWithDict::isClass ( ) const
bool edm::TypeWithDict::isConst ( ) const

Definition at line 408 of file TypeWithDict.cc.

References property_.

Referenced by functionMemberByName(), name(), qualifiedName(), and unvalidatedTypeInfo().

408 { return (property_ & (long)kIsConstant); }
bool edm::TypeWithDict::isEnum ( ) const
bool edm::TypeWithDict::isFundamental ( ) const

Definition at line 414 of file TypeWithDict.cc.

References dataType_, isArray(), and isPointer().

Referenced by finalType(), and unvalidatedTypeInfo().

414 { return dataType_ != nullptr && !isPointer() && !isArray(); }
TDataType * dataType_
Definition: TypeWithDict.h:49
bool isArray() const
bool isPointer() const
bool edm::TypeWithDict::isPointer ( ) const
bool edm::TypeWithDict::isReference ( ) const
bool edm::TypeWithDict::isTemplateInstance ( ) const

Definition at line 420 of file TypeWithDict.cc.

References isClass(), and name().

Referenced by reco::findMethod(), templateName(), and unvalidatedTypeInfo().

420 { return (isClass() && name().back() == '>'); }
std::string name() const
bool isClass() const
bool edm::TypeWithDict::isTypedef ( ) const

Definition at line 422 of file TypeWithDict.cc.

References class_, dataType_, enum_, and ti_.

Referenced by reco::findMethod(), and unvalidatedTypeInfo().

422  {
423  if (class_ != nullptr || dataType_ != nullptr || enum_ != nullptr || *ti_ == typeid(invalidType)) {
424  return false;
425  }
426  return true;
427  }
dummyType ** invalidType
Definition: TypeWithDict.h:44
TDataType * dataType_
Definition: TypeWithDict.h:49
std::type_info const * ti_
Definition: TypeWithDict.h:46
bool edm::TypeWithDict::isVirtual ( ) const

Definition at line 429 of file TypeWithDict.cc.

References class_, and isClass().

Referenced by edm::ObjectWithDict::dynamicType(), and unvalidatedTypeInfo().

429 { return isClass() && (class_->ClassProperty() & (long)kClassHasVirtual); }
bool isClass() const
size_t edm::TypeWithDict::maximumIndex ( size_t  dim) const

Definition at line 523 of file TypeWithDict.cc.

References arrayDimensions_, and isArray().

Referenced by arrayLength(), name(), and unvalidatedTypeInfo().

523  {
524  assert(isArray());
525  return (*arrayDimensions_)[dim];
526  }
bool isArray() const
value_ptr< std::vector< size_t > > arrayDimensions_
Definition: TypeWithDict.h:50
std::string edm::TypeWithDict::name ( void  ) const

Definition at line 456 of file TypeWithDict.cc.

References arrayDimension(), class_, edm::TypeID::className(), TauDecayModes::dec, enum_, mps_fire::i, isArray(), isClass(), isConst(), isPointer(), maximumIndex(), MillePedeFileConverter_cfg::out, AlCaHLTBitMon_QueryRunRegistry::string, and ti_.

Referenced by config.CFG::__str__(), FWDetailView< reco::Muon >::classTypeName(), edm::convert_handle(), FWDetailViewManager::detailViewsFor(), validation.Sample::digest(), helper::Parser::elementType(), reco::findMethod(), friendlyClassName(), functionMemberByName(), FWItemValueGetter::FWItemValueGetter(), getBaseClassOffset(), fwlite::DataGetterHelper::getBranchDataFor(), FWFileEntry::getBranchName(), hasBase(), VIDSelectorBase.VIDSelectorBase::initialize(), isTemplateInstance(), FWParameterSetterBase::makeSetterFor(), nestedType(), FWDetailViewManager::openDetailViewFor(), reco::parser::AnyMethodArgumentFixup::operator()(), edm::operator<(), edm::operator==(), print(), edm::public_base_classes(), reco::parser::MethodSetter::push(), qualifiedName(), FWFileEntry::runFilter(), FWTableViewManager::tableFormats(), FWTableViewManager::tableFormatsImpl(), templateName(), reco::typeCode(), typeInfo(), TypeWithDict(), unscopedName(), unvalidatedTypeInfo(), fwlite::RecordWriter::update(), and userClassName().

456  {
457  if (*ti_ == typeid(invalidType)) {
458  return std::string();
459  }
460  std::ostringstream out;
461  if (isPointer() && isConst()) {
462  out << "const ";
463  }
464  if (enum_ != nullptr) {
465  if (enum_->GetClass()) {
466  out << std::string(enum_->GetClass()->GetName());
467  out << "::";
468  }
469  out << enum_->GetName();
470  } else if (*ti_ == typeid(dummyType) && isClass()) {
471  out << class_->GetName();
472  } else {
473  out << TypeID(*ti_).className();
474  }
475  if (isPointer()) {
476  out << '*';
477  }
478  if (isArray()) {
479  for (size_t i = 0; i < arrayDimension(); ++i) {
480  out << '[';
481  out << std::dec << maximumIndex(i);
482  out << ']';
483  }
484  }
485  return out.str();
486  }
bool isConst() const
dummyType ** invalidType
Definition: TypeWithDict.h:44
size_t maximumIndex(size_t dim) const
size_t arrayDimension() const
bool isArray() const
std::type_info const * ti_
Definition: TypeWithDict.h:46
bool isClass() const
bool isPointer() const
TypeWithDict edm::TypeWithDict::nestedType ( char const *  nestedName) const

Definition at line 566 of file TypeWithDict.cc.

References byName(), and name().

Referenced by helper::Parser::elementType(), and unvalidatedTypeInfo().

566 { return byName(name() + "::" + nestedName); }
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:74
std::string name() const
TypeWithDict edm::TypeWithDict::nestedType ( std::string const &  nestedName) const

Definition at line 568 of file TypeWithDict.cc.

References byName(), and name().

568  {
569  return byName(name() + "::" + nestedName);
570  }
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:74
std::string name() const
edm::TypeWithDict::operator bool ( ) const
explicit

Definition at line 345 of file TypeWithDict.cc.

References class_, dataType_, enum_, and ti_.

345  {
346  if (*ti_ == typeid(invalidType)) {
347  return false;
348  }
349  if (class_ != nullptr || dataType_ != nullptr || enum_ != nullptr) {
350  return true;
351  }
352  return false;
353  }
dummyType ** invalidType
Definition: TypeWithDict.h:44
TDataType * dataType_
Definition: TypeWithDict.h:49
std::type_info const * ti_
Definition: TypeWithDict.h:46
TypeWithDict & edm::TypeWithDict::operator= ( TypeWithDict const &  rhs)

Definition at line 263 of file TypeWithDict.cc.

References arrayDimensions_, class_, dataType_, enum_, property_, and ti_.

263  {
264  if (this != &rhs) {
265  ti_ = rhs.ti_;
266  class_ = rhs.class_;
267  enum_ = rhs.enum_;
268  dataType_ = rhs.dataType_;
269  arrayDimensions_ = rhs.arrayDimensions_;
270  property_ = rhs.property_;
271  }
272  return *this;
273  }
TDataType * dataType_
Definition: TypeWithDict.h:49
std::type_info const * ti_
Definition: TypeWithDict.h:46
value_ptr< std::vector< size_t > > arrayDimensions_
Definition: TypeWithDict.h:50
void const * edm::TypeWithDict::pointerToBaseType ( void const *  ptr,
TypeWithDict const &  derivedType 
) const

Definition at line 545 of file TypeWithDict.cc.

References getBaseClassOffset(), isClass(), PFRecoTauDiscriminationByIsolation_cfi::offset, and ti_.

Referenced by pointerToContainedType(), unvalidatedTypeInfo(), and fwlite::DataGetterHelper::wrapperBasePtr().

545  {
546  if (!isClass()) {
547  return ptr;
548  }
549  if (this->ti_ == derivedType.ti_ || *this->ti_ == *derivedType.ti_) {
550  return ptr;
551  }
552  int offset = derivedType.getBaseClassOffset(*this);
553  if (offset < 0) {
554  return nullptr;
555  }
556  return static_cast<char const*>(ptr) + offset;
557  }
std::type_info const * ti_
Definition: TypeWithDict.h:46
bool isClass() const
void const * edm::TypeWithDict::pointerToContainedType ( void const *  ptr,
TypeWithDict const &  derivedType 
) const

Definition at line 559 of file TypeWithDict.cc.

References isClass(), and pointerToBaseType().

Referenced by unvalidatedTypeInfo().

559  {
560  if (!isClass()) {
561  return ptr;
562  }
563  return pointerToBaseType(ptr, derivedType);
564  }
void const * pointerToBaseType(void const *ptr, TypeWithDict const &derivedType) const
bool isClass() const
void edm::TypeWithDict::print ( std::ostream &  os) const

Definition at line 431 of file TypeWithDict.cc.

References name().

Referenced by edm::operator<<(), and unvalidatedTypeInfo().

431 { os << name(); }
std::string name() const
std::string edm::TypeWithDict::qualifiedName ( ) const

Definition at line 441 of file TypeWithDict.cc.

References isConst(), isPointer(), isReference(), name(), property_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by cppName(), reco::parser::MethodInvoker::invoke(), reco::parser::MethodInvoker::returnTypeName(), reco::parser::SingleInvoker::throwFailedConversion(), typeInfo(), and unvalidatedTypeInfo().

441  {
442  std::string qname(name());
443  if (isConst() && !isPointer()) {
444  qname = "const " + qname;
445  } else if (property_ & kIsConstPointer) {
446  qname += " const";
447  }
448  if (isReference()) {
449  qname += '&';
450  }
451  return qname;
452  }
bool isConst() const
std::string name() const
bool isReference() const
bool isPointer() const
size_t edm::TypeWithDict::size ( void  ) const

Definition at line 492 of file TypeWithDict.cc.

References arrayLength(), class_, dataType_, enum_, createfilelist::int, isArray(), and isPointer().

Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), allocate(), construct(), toType(), and unvalidatedTypeInfo().

492  {
493  size_t nBytes = 0;
494  if (isPointer()) {
495  nBytes = sizeof(void*);
496  } else if (class_ != nullptr) {
497  nBytes = class_->GetClassSize();
498  } else if (dataType_ != nullptr) {
499  nBytes = dataType_->Size();
500  } else if (enum_ != nullptr) {
501  nBytes = sizeof(int);
502  }
503  if (isArray()) {
504  nBytes *= arrayLength();
505  }
506  return nBytes;
507  }
TDataType * dataType_
Definition: TypeWithDict.h:49
bool isArray() const
bool isPointer() const
size_t arrayLength() const
int edm::TypeWithDict::stringToEnumValue ( std::string const &  name) const

Definition at line 774 of file TypeWithDict.cc.

References RecoEcal_EventContent_cff::ec, enum_, Exception, isEnum(), and edm::errors::LogicError.

Referenced by reco::parser::AnyMethodArgumentFixup::operator()(), and unvalidatedTypeInfo().

774  {
775  if (!isEnum()) {
776  throw Exception(errors::LogicError) << "Function TypeWithDict::stringToEnumValue(), type\n"
777  << name << "\nis not an enum\n";
778  }
779  TEnumConstant const* ec = enum_->GetConstant(name.c_str());
780  if (!ec) {
781  throw Exception(errors::LogicError) << "Function TypeWithDict::stringToEnumValue(), type\n"
782  << name << "\nis not an enum constant\n";
783  }
784  return static_cast<int>(ec->GetValue());
785  }
bool isEnum() const
std::string name() const
TypeWithDict & edm::TypeWithDict::stripConstRef ( )

Definition at line 254 of file TypeWithDict.cc.

References isPointer(), and property_.

Referenced by reco::findMethod(), and reco::parser::MethodInvoker::invoke().

254  {
255  if (isPointer()) {
256  property_ &= ~((long)kIsReference | (long)kIsConstPointer);
257  } else {
258  property_ &= ~((long)kIsConstant | (long)kIsReference);
259  }
260  return *this;
261  }
bool isPointer() const
TypeWithDict edm::TypeWithDict::templateArgumentAt ( size_t  index) const

Definition at line 697 of file TypeWithDict.cc.

References begin, byName(), EnergyCorrector::c, className(), egammaForCoreTracking_cff::depth, end, training_settings::idx, isClass(), AlCaHLTBitMon_QueryRunRegistry::string, TypeWithDict(), and unscopedName().

Referenced by helper::Parser::elementType(), and unvalidatedTypeInfo().

697  {
698  if (!isClass()) {
699  return TypeWithDict();
700  }
702  auto begin = className.find('<');
703  if (begin == std::string::npos) {
704  return TypeWithDict();
705  }
706  ++begin;
707  auto end = className.rfind('>');
708  assert(end != std::string::npos);
709  assert(begin < end);
710  int depth = 0;
711  size_t argCount = 0;
712  for (auto idx = begin; idx < end; ++idx) {
713  char c = className[idx];
714  if (c == '<') {
715  ++depth;
716  } else if (c == '>') {
717  --depth;
718  assert(depth >= 0);
719  } else if ((depth == 0) && (c == ',')) {
720  if (argCount < index) {
721  begin = idx + 1;
722  ++argCount;
723  } else {
724  end = idx;
725  break;
726  }
727  }
728  }
729  assert(depth == 0);
730  if (argCount < index) {
731  return TypeWithDict();
732  }
733  return byName(className.substr(begin, end - begin));
734  }
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:74
std::string unscopedName() const
bool isClass() const
#define end
Definition: vmac.h:39
#define begin
Definition: vmac.h:32
std::string className(const T &t)
Definition: ClassName.h:30
std::string edm::TypeWithDict::templateName ( ) const

Definition at line 666 of file TypeWithDict.cc.

References begin, EnergyCorrector::c, egammaForCoreTracking_cff::depth, end, training_settings::idx, isTemplateInstance(), name(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by reco::findMethod(), and unvalidatedTypeInfo().

666  {
667  if (!isTemplateInstance()) {
668  return "";
669  }
670  if (name() == "std::string") {
671  return std::string("std::basic_string");
672  }
674  auto begin = templateName.find('<');
675  assert(begin != std::string::npos);
676  auto end = templateName.rfind('<');
677  assert(end != std::string::npos);
678  assert(begin <= end);
679  if (begin < end) {
680  int depth = 1;
681  for (auto idx = begin + 1; idx <= end; ++idx) {
682  char c = templateName[idx];
683  if (c == '<') {
684  if (depth == 0) {
685  begin = idx;
686  }
687  ++depth;
688  } else if (c == '>') {
689  --depth;
690  assert(depth >= 0);
691  }
692  }
693  }
694  return templateName.substr(0, begin);
695  }
std::string templateName() const
bool isTemplateInstance() const
std::string name() const
#define end
Definition: vmac.h:39
#define begin
Definition: vmac.h:32
TypeWithDict edm::TypeWithDict::toType ( ) const

Definition at line 633 of file TypeWithDict.cc.

References arrayDimensions_, mps_fire::i, isArray(), isPointer(), isReference(), property_, size(), ti_, and TypeWithDict().

Referenced by fireworks::OptionNode::fillOptionForType(), reco::findDataMember(), reco::findMethod(), reco::parser::MethodInvoker::invoke(), and unvalidatedTypeInfo().

633  {
634  if (*ti_ == typeid(invalidType)) {
635  return TypeWithDict();
636  }
637  if (isReference()) {
638  TypeWithDict newType = *this;
639  newType.property_ &= ~((long)kIsReference);
640  return newType;
641  }
642  if (isPointer()) {
643  TypeWithDict newType = *this;
644  newType.property_ &= ~((long)kIsPointer | (long)kIsConstPointer);
645  return newType;
646  }
647  if (isArray()) {
648  TypeWithDict newType = *this;
649  size_t size = newType.arrayDimensions_->size();
650  if (size == 1) {
651  newType.property_ &= ~((long)kIsArray);
652  value_ptr<std::vector<size_t> > emptyVec;
653  newType.arrayDimensions_ = emptyVec;
654  } else {
655  std::vector<size_t>& dims = *newType.arrayDimensions_;
656  for (size_t i = 0; i != size; ++i) {
657  dims[i] = dims[i + 1];
658  }
659  newType.arrayDimensions_->resize(size - 1);
660  }
661  return newType;
662  }
663  return *this;
664  }
dummyType ** invalidType
Definition: TypeWithDict.h:44
bool isArray() const
std::type_info const * ti_
Definition: TypeWithDict.h:46
bool isReference() const
size_t size() const
bool isPointer() const
std::type_info const & edm::TypeWithDict::typeInfo ( ) const

Definition at line 357 of file TypeWithDict.cc.

References taus_updatedMVAIds_cff::category, edm::errors::DictionaryNotFound, Exception, isArray(), isClass(), isEnum(), isPointer(), edm::errors::LogicError, name(), qualifiedName(), AlCaHLTBitMon_QueryRunRegistry::string, and ti_.

Referenced by edm::ObjectWithDict::castObject(), FWFileEntry::getBranchName(), edm::EventBase::getByLabel(), edm::productholderindexhelper::getContainedType(), FWSimpleRepresentationChecker::inheritsFrom(), reco::parser::LazyInvoker::invoker(), edm::public_base_classes(), edm::ThinningProducer< Collection, Selector >::registerThinnedAssociations(), FWFileEntry::runFilter(), edm::BranchDescription::setSwitchAliasForBranch(), edm::BranchDescription::unwrappedTypeID(), and edm::BranchDescription::wrappedTypeID().

357  {
358  if (*ti_ == typeid(dummyType) || isPointer() || isArray()) {
359  // No accurate type_info
360  if (qualifiedName().c_str() != nullptr) {
361  std::string category("unknown");
362  if (isPointer()) {
363  category = "a pointer";
364  } else if (isArray()) {
365  category = "an array";
366  } else if (isEnum()) {
367  category = "an enum";
368  } else if (isClass()) {
369  throw Exception(errors::DictionaryNotFound) << "No Dictionary for class: '" << name() << "'" << std::endl;
370  }
372  << "Function TypeWithDict::typeInfo: Type\n"
373  << qualifiedName() << "\ndoes not have valid type_info information in ROOT\n"
374  << "because it is " << category << ".\n";
375  }
376  }
377  return *ti_;
378  }
bool isEnum() const
std::string qualifiedName() const
bool isArray() const
std::string name() const
std::type_info const * ti_
Definition: TypeWithDict.h:46
bool isClass() const
bool isPointer() const
std::string edm::TypeWithDict::unscopedName ( ) const

Definition at line 454 of file TypeWithDict.cc.

References name(), and edm::stripNamespace().

Referenced by templateArgumentAt(), and unvalidatedTypeInfo().

454 { return stripNamespace(name()); }
std::string name() const
std::string stripNamespace(std::string const &theName)
Definition: TypeID.cc:90
std::type_info const& edm::TypeWithDict::unvalidatedTypeInfo ( ) const
inline
std::string edm::TypeWithDict::userClassName ( ) const

Definition at line 488 of file TypeWithDict.cc.

References name().

Referenced by unvalidatedTypeInfo().

488 { return name(); }
std::string name() const

Friends And Related Function Documentation

bool operator== ( TypeWithDict const &  a,
std::type_info const &  b 
)
friend

Definition at line 819 of file TypeWithDict.cc.

Referenced by edm::operator!=(), and edm::operator<().

819  {
820  if (*a.ti_ == typeid(TypeWithDict::dummyType) || a.isPointer() || a.isArray()) {
821  // No accurate type_info
822  return a.name() == TypeID(b).className();
823  }
824  return *a.ti_ == b;
825  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
friend class TypeBases
friend

Definition at line 39 of file TypeWithDict.h.

friend class TypeDataMembers
friend

Definition at line 40 of file TypeWithDict.h.

friend class TypeFunctionMembers
friend

Definition at line 41 of file TypeWithDict.h.

Member Data Documentation

value_ptr<std::vector<size_t> > edm::TypeWithDict::arrayDimensions_
private

Definition at line 50 of file TypeWithDict.h.

Referenced by arrayDimension(), byName(), maximumIndex(), operator=(), and toType().

TClass* edm::TypeWithDict::class_
private
TDataType* edm::TypeWithDict::dataType_
private
TEnum* edm::TypeWithDict::enum_
private
long edm::TypeWithDict::property_
private
std::type_info const* edm::TypeWithDict::ti_
private