LiteralStorage.cxx revision 7c478bd95313f5f23a4c958a745db2134aa03244
// Copyright (c) 1996 James Clark
// See the file COPYING for copying permission.
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __GNUG__
#pragma implementation
#endif
#include "splib.h"
#include "LiteralStorage.h"
#include "CodingSystem.h"
#include <string.h>
#ifdef DECLARE_MEMMOVE
extern "C" {
}
#endif
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#endif
class LiteralStorageObject : public StorageObject {
public:
LiteralStorageObject(const StringC &);
private:
void operator=(const LiteralStorageObject &); // undefined
};
class MemoryInputCodingSystem : public InputCodingSystem {
public:
Decoder *makeDecoder() const;
};
class MemoryDecoder : public Decoder {
public:
};
{
}
const StringC &,
Messenger &,
{
return new LiteralStorageObject(id);
}
{
static MemoryInputCodingSystem cs;
return &cs;
}
{
return 1;
}
const char *LiteralStorageManager::type() const
{
return type_;
}
{
return 0;
}
{
}
{
nBytesRead_ = 0;
return 1;
}
{
return 0;
nBytesRead_ += nread;
return 1;
}
{
return new MemoryDecoder;
}
{
}
const char **rest)
{
return nChars;
}
#ifdef SP_NAMESPACE
}
#endif