| # Gaudi Framework, version v22r0 |

Home |  | Generated: 9 Feb 2011

# Gaudi::Utils::TypeNameString Class Reference

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

`#include <TypeNameString.h>`

List of all members.

## Public Member Functions
| TypeNameString (const char tn[])
| TypeNameString (const std::string &tn)
| TypeNameString (const std::string &tn, const std::string &deftyp)
const std::string & | type () const
const std::string & | name () const
bool | haveType () const
## Private Member Functions
void | init (const std::string &tn, const std::string &deftyp)
## 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 9 of file TypeNameString.h.

## Constructor & Destructor Documentation

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

Definition at line 19 of file TypeNameString.h.

    00019 : m_haveType(false) { init(tn, tn); }

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

Definition at line 20 of file TypeNameString.h.

    00020 : m_haveType(false) { init(tn, tn); }

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

Definition at line 21 of file TypeNameString.h.

    00021 { init(tn, deftyp); m_haveType = true; }

## Member Function Documentation

bool Gaudi::Utils::TypeNameString::haveType | ( |  | ) | const`[inline]`

Definition at line 24 of file TypeNameString.h.

    00024 { return m_haveType; }

void Gaudi::Utils::TypeNameString::init | ( | const std::string & | tn,
|  | const std::string & | deftyp |
| ) |  |  | `[inline, private]`

Definition at line 12 of file TypeNameString.h.

    00012                                                                  {
    00013         const std::string::size_type slash_pos = tn.find_first_of("/");
    00014         m_haveType = slash_pos != std::string::npos;
    00015         m_name = (m_haveType) ? tn.substr( slash_pos + 1) : tn;
    00016         m_type = (m_haveType) ? tn.substr( 0, slash_pos ) : deftyp;
    00017       }

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

Definition at line 23 of file TypeNameString.h.

    00023 { return m_name; }

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

Definition at line 22 of file TypeNameString.h.

    00022 { return m_type; }

## Member Data Documentation

bool Gaudi::Utils::TypeNameString::m_haveType`[private]`

Definition at line 11 of file TypeNameString.h.

std::string Gaudi::Utils::TypeNameString::m_name`[private]`

Definition at line 10 of file TypeNameString.h.

std::string Gaudi::Utils::TypeNameString::m_type`[private]`

Definition at line 10 of file TypeNameString.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r0/GaudiKernel/GaudiKernel/TypeNameString.h

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines