ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DataConversion.h
Go to the documentation of this file.
1 #ifndef ROSE_DATA_CONVERSION_H
2 #define ROSE_DATA_CONVERSION_H
3 
4 #include <string>
5 
9 class DataConverter {
10 public:
11  virtual ~DataConverter() {}
12 
14  virtual std::string name() const = 0;
15 
19  virtual uint8_t* encode(uint8_t* buffer, size_t* nbytes) = 0;
20 
24  virtual uint8_t* decode(uint8_t* buffer, size_t* nbytes) = 0;
25 };
26 
28 class Rot13: public DataConverter {
29  virtual ~Rot13() {}
30  virtual std::string name() const {return "ROT-13";}
31  virtual uint8_t* encode(uint8_t* buffer, size_t* nbytes);
32  virtual uint8_t* decode(uint8_t* buffer, size_t* nbytes);
33 };
34 
35 #endif