fipa_acl  1.4
Classes | Public Types | Public Member Functions | List of all members
convertDigitsToHexImpl Struct Reference

#include <grammar_common.h>

Classes

struct  result
 

Public Types

typedef std::string result_type
 

Public Member Functions

template<typename T >
result_type operator() (T arg) const
 
result_type operator() (std::string arg) const
 

Detailed Description

Convert a string that represents an integer to a string that represent an hexadecimal number

Definition at line 316 of file grammar_common.h.

Member Typedef Documentation

Definition at line 318 of file grammar_common.h.

Member Function Documentation

template<typename T >
result_type convertDigitsToHexImpl::operator() ( arg) const
inline

Definition at line 327 of file grammar_common.h.

328  {
329  return "";
330  }
result_type convertDigitsToHexImpl::operator() ( std::string  arg) const
inline

Definition at line 332 of file grammar_common.h.

333  {
334  unsigned int hexNumber = atoi(arg.c_str());
335 
336  char buffer[512];
337  snprintf(buffer,512,"%#x",hexNumber);
338 
339  return std::string(buffer);
340  }

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