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

#include <grammar_common.h>

Classes

struct  result
 

Public Types

typedef uint32_t result_type
 

Public Member Functions

template<typename T >
result_type operator() (T digit) const
 

Detailed Description

Definition at line 223 of file grammar_common.h.

Member Typedef Documentation

Definition at line 225 of file grammar_common.h.

Member Function Documentation

template<typename T >
result_type digitPaddingBytesImpl::operator() ( digit) const
inline

Definition at line 234 of file grammar_common.h.

235  {
236  char lastbyte = digit[0];
237  // odd number of characters
238  // check if last byte is properly padded
239  if( (lastbyte & 0x0F) == 0)
240  {
241  // properly padded
242  LOG_DEBUG("CodedNumber properly padded byte detected: %x", lastbyte);
243  return 0;
244  } else {
245  LOG_DEBUG("CodedNumber with unpadded byte detected: %x", lastbyte);
246  return 1;
247  }
248  }

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