CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Private Attributes

edm::CodedException< Code > Class Template Reference

#include <CodedException.h>

Inheritance diagram for edm::CodedException< Code >:
cms::Exception

List of all members.

Public Types

typedef std::map< Code,
std::string > 
CodeMap

Public Member Functions

Code categoryCode () const
 CodedException (Code category, const std::string &message)
 CodedException (Code category, const std::string &message, const cms::Exception &another)
 CodedException (const CodedException &other)
 CodedException (Code category)
int returnCode () const
virtual ~CodedException () throw ()

Static Public Member Functions

static std::string codeToString (Code)
 -------------- implementation details ------------------

Private Attributes

Code category_

Detailed Description

template<class Code>
class edm::CodedException< Code >

Definition at line 23 of file CodedException.h.


Member Typedef Documentation

template<class Code >
typedef std::map<Code,std::string> edm::CodedException< Code >::CodeMap

Definition at line 45 of file CodedException.h.


Constructor & Destructor Documentation

template<class Code >
edm::CodedException< Code >::CodedException ( Code  category) [explicit]

Definition at line 71 of file CodedException.h.

                                                    :
    cms::Exception(codeToString(aCategory)),
    category_(aCategory)
  {
  }
template<class Code >
edm::CodedException< Code >::CodedException ( Code  category,
const std::string &  message 
)

Definition at line 78 of file CodedException.h.

                                                                :
    cms::Exception(codeToString(aCategory),message),
    category_(aCategory)
  {
  }
template<class Code >
edm::CodedException< Code >::CodedException ( Code  category,
const std::string &  message,
const cms::Exception another 
)

Definition at line 86 of file CodedException.h.

                                                                   :
    cms::Exception(codeToString(aCategory),message,another),
    category_(aCategory)
  {
  }
template<class Code >
edm::CodedException< Code >::CodedException ( const CodedException< Code > &  other)

Definition at line 95 of file CodedException.h.

                                                                 :
    cms::Exception(other),
    category_(other.category_)
  {
  }
template<class Code >
edm::CodedException< Code >::~CodedException ( ) throw () [virtual]

Definition at line 102 of file CodedException.h.

  {
  }

Member Function Documentation

template<class Code >
Code edm::CodedException< Code >::categoryCode ( ) const [inline]

Definition at line 39 of file CodedException.h.

References edm::CodedException< Code >::category_.

{ return category_; }
template<class Code >
std::string edm::CodedException< Code >::codeToString ( Code  c) [static]

-------------- implementation details ------------------

Definition at line 60 of file CodedException.h.

References edm::getCodeTable(), and i.

  {
    extern void getCodeTable(CodeMap*&);
    CodeMap* trans;
    getCodeTable(trans);
    typename CodeMap::const_iterator i(trans->find(c));
    return i!=trans->end() ? i->second : std::string("UnknownCode");
  }
template<class Code >
int edm::CodedException< Code >::returnCode ( ) const [inline]

Definition at line 41 of file CodedException.h.

References edm::CodedException< Code >::category_.

{ return static_cast<int>(category_); }

Member Data Documentation

template<class Code >
Code edm::CodedException< Code >::category_ [private]