/*
 * Copyright (C) 2007-2023 Xagasoft, All rights reserved.
 *
 * This file is part of the libbu++ library and is released under the
 * terms of the license contained in the file LICENSE.
 */

#ifndef TEXT_CODEC_H
#define TEXT_CODEC_H

#include "bu/text.h"
#include "bu/blob.h"

namespace Bu
{
    class Text;
    class Blob;
    class TextBuilder;
    class BlobBuilder;

    /**
     * Represents a textual format and the routines to convert from that
     * format to unicode code points and vica versa.
     */
    class TextCodec
    {
    public:
        TextCodec();
        virtual ~TextCodec();

//        virtual Blob encode( const Text &rSource );
//        virtual Text decode( const Blob &rSource, int32_t &rBytesUsed );

        virtual void encode( BlobBuilder &rTarget, const Text &rSource )=0;
        virtual int32_t decode( TextBuilder &rTarget, const Blob &rSource )=0;

    private:
    };
};

#endif
