| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Attributes | List of all members
Gaudi::Utils::TypeNameString Class Reference

Helper class to parse a string of format "type/name". More...

`#include <GaudiKernel/TypeNameString.h>`

Collaboration diagram for Gaudi::Utils::TypeNameString:
[legend]

## Public Member Functions
| TypeNameString (const char tn[])
| TypeNameString (const std::string &tn)
| TypeNameString (const std::string &tn, const std::string &deftyp)
template<class T , class V , class H >
| TypeNameString (const Gaudi::Property< T, V, H > &prop)
const std::string & | type () const
const std::string & | name () const
bool | haveType () const

## Private Attributes
std::string | m_type
std::string | m_name
bool | m_haveType

## Detailed Description

Helper class to parse a string of format "type/name".

Definition at line 12 of file TypeNameString.h.

## Constructor & Destructor Documentation

Gaudi::Utils::TypeNameString::TypeNameString | ( | const char | tn[] | ) |
| inline

Definition at line 18 of file TypeNameString.h.

18 : TypeNameString( std::string{tn} ) {}
std::string
STL class.
Gaudi::Utils::TypeNameString::TypeNameString
TypeNameString(const char tn[])
Definition: TypeNameString.h:18

Gaudi::Utils::TypeNameString::TypeNameString | ( | const std::string & | tn | ) |
| inline

Definition at line 19 of file TypeNameString.h.

19 : m_type{tn}
20 {
21 const auto slash_pos = m_type.find_first_of( "/" );
22 m_haveType = slash_pos != std::string::npos;
23 if ( m_haveType ) {
24 m_name = m_type.substr( slash_pos + 1 );
25 m_type = m_type.substr( 0, slash_pos );
26 } else
27 m_name = m_type;
28 }
Gaudi::Utils::TypeNameString::m_haveType
bool m_haveType
Definition: TypeNameString.h:15
std::string::find_first_of
T find_first_of(T...args)
std::string::substr
T substr(T...args)
Gaudi::Utils::TypeNameString::m_name
std::string m_name
Definition: TypeNameString.h:14
Gaudi::Utils::TypeNameString::m_type
std::string m_type
Definition: TypeNameString.h:14

Gaudi::Utils::TypeNameString::TypeNameString | ( | const std::string & | tn,
|  | const std::string & | deftyp
| ) |  |
| inline

Definition at line 29 of file TypeNameString.h.

29 : TypeNameString( tn )
30 {
31 if ( !m_haveType ) {
32 m_type = deftyp;
33 }
34 }
Gaudi::Utils::TypeNameString::m_haveType
bool m_haveType
Definition: TypeNameString.h:15
Gaudi::Utils::TypeNameString::TypeNameString
TypeNameString(const char tn[])
Definition: TypeNameString.h:18
Gaudi::Utils::TypeNameString::m_type
std::string m_type
Definition: TypeNameString.h:14
template<class T , class V , class H >

Gaudi::Utils::TypeNameString::TypeNameString | ( | const Gaudi::Property< T, V, H > & | prop | ) |
| inline

Definition at line 36 of file TypeNameString.h.

36 : TypeNameString( prop.value() )
37 {
38 }
Gaudi::Utils::TypeNameString::TypeNameString
TypeNameString(const char tn[])
Definition: TypeNameString.h:18
Gaudi::Property::value
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:478

## Member Function Documentation

bool Gaudi::Utils::TypeNameString::haveType | ( |  | ) | const
| inline

Definition at line 41 of file TypeNameString.h.

41 { return m_haveType; }
Gaudi::Utils::TypeNameString::m_haveType
bool m_haveType
Definition: TypeNameString.h:15

const std::string& Gaudi::Utils::TypeNameString::name | ( |  | ) | const
| inline

Definition at line 40 of file TypeNameString.h.

40 { return m_name; }
Gaudi::Utils::TypeNameString::m_name
std::string m_name
Definition: TypeNameString.h:14

const std::string& Gaudi::Utils::TypeNameString::type | ( |  | ) | const
| inline

Definition at line 39 of file TypeNameString.h.

39 { return m_type; }
Gaudi::Utils::TypeNameString::m_type
std::string m_type
Definition: TypeNameString.h:14

## Member Data Documentation

bool Gaudi::Utils::TypeNameString::m_haveType
| private

Definition at line 15 of file TypeNameString.h.

std::string Gaudi::Utils::TypeNameString::m_name
| private

Definition at line 14 of file TypeNameString.h.

std::string Gaudi::Utils::TypeNameString::m_type
| private

Definition at line 14 of file TypeNameString.h.

The documentation for this class was generated from the following file:

- GaudiKernel/GaudiKernel/TypeNameString.h