1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
//
// convfact.h - Text Agent Factory
// Created: 19 Jan 1999
// Author: Theppitak Karoonboonyanan <theppitak@gmail.com>
//
#include "convfact.h"
#include "utf8.h"
#include "tis620.h"
TextReader*
CreateTextReader (ETextFormat format, const char* inText)
{
switch (format) {
case TIS620: return new TIS620Reader (inText);
case UTF8: return new UTF8Reader (inText);
default: return 0;
}
}
TextWriter*
CreateTextWriter (ETextFormat format, char* outText, int outLen)
{
switch (format) {
case TIS620: return new TIS620Writer (outText, outLen);
case UTF8: return new UTF8Writer (outText, outLen);
default: return 0;
}
}
|