You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
854 B
39 lines
854 B
14 years ago
|
#if !defined Filter_h
|
||
|
#define Filter_h
|
||
|
|
||
|
#include <vector>
|
||
|
#include <map>
|
||
|
#include <string>
|
||
|
|
||
|
namespace merge_lib
|
||
|
{
|
||
|
class Object;
|
||
|
class Decoder;
|
||
|
//this class is needed to parse object in order to create
|
||
|
//all decoders to decode object's stream
|
||
|
class Filter
|
||
|
{
|
||
|
public:
|
||
|
Filter(Object * objectWithStream): _objectWithStream(objectWithStream)
|
||
|
{
|
||
|
_createAllDecodersSet();
|
||
|
}
|
||
|
virtual ~Filter();
|
||
|
//replace coded stream with decoded
|
||
|
void getDecodedStream(std::string & stream);
|
||
|
private:
|
||
|
//methods
|
||
|
|
||
|
//parse object's content and fill out vector with
|
||
|
//necessary decoders
|
||
|
std::vector <Decoder * > _getDecoders();
|
||
|
void _createAllDecodersSet();
|
||
|
|
||
|
//members
|
||
|
Object * _objectWithStream;
|
||
|
static std::map<std::string, Decoder *> _allDecoders;
|
||
|
};
|
||
|
}
|
||
|
#endif
|
||
|
|