src.dualinventive.com/jjacobs/dinetrpcll-sniffer/libdipp/include/di/Buffer.h

34 lines
765 B
C++

/**
* @file Buffer.h
* @brief DI Buffer
* @date Aug 21, 2015
* @author R.W.A. van der Heijden
* @copyright 2015 Dual Inventive Technology Centre B.V.
*
* DI Buffer is an alternative for std::string. Di::Buffer
* uses uint8_t instead of char (for std::string).
* it prevents the use of casting from signed to unsigned
* all over the place.
*/
#ifndef INCLUDE_DI_BUFFER_H_
#define INCLUDE_DI_BUFFER_H_
#include <string>
namespace Di {
/**
* @class Buffer
*
* Dynamic buffer class (unsigned std::string)
*/
class Buffer : public std::basic_string<uint8_t> {
// Inherit constructors from base class
using std::basic_string<uint8_t>::basic_string;
using std::basic_string<uint8_t>::operator=;
};
} // namespace Di
#endif // INCLUDE_DI_BUFFER_H_