CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
types.cc File Reference
#include "FWCore/ParameterSet/interface/types.h"
#include "boost/lexical_cast.hpp"
#include "FWCore/ParameterSet/interface/split.h"
#include "FWCore/Utilities/interface/Parse.h"
#include <cctype>
#include <cstdlib>
#include <limits>
#include <sstream>
#include <stdexcept>
#include <cassert>

Go to the source code of this file.

Functions

static void append_hex_rep (std::string &s, unsigned int c)
 
static unsigned int from_hex (char c)
 
static char to_hex (unsigned int i)
 

Function Documentation

static void append_hex_rep ( std::string &  s,
unsigned int  c 
)
static

Definition at line 51 of file types.cc.

References to_hex().

Referenced by edm::encode().

51  {
52  s += to_hex(c / 16u);
53  s += to_hex(c % 16u);
54 } // append_hex_rep()
static char to_hex(unsigned int i)
Definition: types.cc:29
static unsigned int from_hex ( char  c)
static

Definition at line 36 of file types.cc.

Referenced by edm::decode(), and edm::encode().

36  {
37  switch(c) {
38  case '0': case '1': case '2': case '3': case '4':
39  case '5': case '6': case '7': case '8': case '9':
40  return c - '0';
41  case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
42  return 10 + c - 'a';
43  case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
44  return 10 + c - 'A';
45  default:
46  return 0;
47  }
48 } // from_hex()
static char to_hex ( unsigned int  i)
static

Definition at line 29 of file types.cc.

Referenced by append_hex_rep().

29  {
30  return i + (i < 10u ? '0' : ('A'-10));
31 }
int i
Definition: DBlmapReader.cc:9