Back to index

tetex-bin  3.0
Public Member Functions | Protected Attributes | Private Attributes
EmbedStream Class Reference

#include <Stream.h>

Inheritance diagram for EmbedStream:
Inheritance graph
[legend]
Collaboration diagram for EmbedStream:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 EmbedStream (Stream *strA, Object *dictA, GBool limitedA, Guint lengthA)
virtual ~EmbedStream ()
virtual StreammakeSubStream (Guint start, GBool limitedA, Guint lengthA, Object *dictA)
virtual StreamKind getKind ()
virtual void reset ()
virtual int getChar ()
virtual int lookChar ()
virtual int getPos ()
virtual void setPos (Guint pos, int dir=0)
virtual Guint getStart ()
virtual void moveStart (int delta)
virtual GBool isBinary (GBool last=gTrue)
virtual BaseStreamgetBaseStream ()
virtual DictgetDict ()
virtual void doDecryption (Guchar *fileKey, int keyLength, int objNum, int objGen)
int incRef ()
int decRef ()
virtual void close ()
virtual int getRawChar ()
virtual char * getLine (char *buf, int size)
virtual GStringgetPSFilter (int psLevel, char *indent)
virtual GBool isEncoder ()
StreamaddFilters (Object *dict)
virtual void ignoreLength ()

Protected Attributes

Decryptdecrypt

Private Attributes

Streamstr
GBool limited
Guint length

Detailed Description

Definition at line 345 of file Stream.h.


Constructor & Destructor Documentation

EmbedStream::EmbedStream ( Stream strA,
Object dictA,
GBool  limitedA,
Guint  lengthA 
)

Definition at line 790 of file Stream.cc.

                                                    :
    BaseStream(dictA) {
  str = strA;
  limited = limitedA;
  length = lengthA;
}

Definition at line 798 of file Stream.cc.

                          {
}

Member Function Documentation

Stream * Stream::addFilters ( Object dict) [inherited]

Definition at line 92 of file Stream.cc.

                                       {
  Object obj, obj2;
  Object params, params2;
  Stream *str;
  int i;

  str = this;
  dict->dictLookup("Filter", &obj);
  if (obj.isNull()) {
    obj.free();
    dict->dictLookup("F", &obj);
  }
  dict->dictLookup("DecodeParms", &params);
  if (params.isNull()) {
    params.free();
    dict->dictLookup("DP", &params);
  }
  if (obj.isName()) {
    str = makeFilter(obj.getName(), str, &params);
  } else if (obj.isArray()) {
    for (i = 0; i < obj.arrayGetLength(); ++i) {
      obj.arrayGet(i, &obj2);
      if (params.isArray())
       params.arrayGet(i, &params2);
      else
       params2.initNull();
      if (obj2.isName()) {
       str = makeFilter(obj2.getName(), str, &params2);
      } else {
       error(getPos(), "Bad filter name");
       str = new EOFStream(str);
      }
      obj2.free();
      params2.free();
    }
  } else if (!obj.isNull()) {
    error(getPos(), "Bad 'Filter' attribute in stream");
  }
  obj.free();
  params.free();

  return str;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void Stream::close ( ) [virtual, inherited]

Reimplemented in MemStream, FileStream, and FilterStream.

Definition at line 59 of file Stream.cc.

                   {
}

Here is the caller graph for this function:

int Stream::decRef ( ) [inline, inherited]

Definition at line 58 of file Stream.h.

{ return --ref; }
void BaseStream::doDecryption ( Guchar fileKey,
int  keyLength,
int  objNum,
int  objGen 
) [virtual, inherited]

Reimplemented in MemStream.

Definition at line 289 of file Stream.cc.

                                                   {
  decrypt = new Decrypt(fileKey, keyLength, objNum, objGen);
}

Here is the caller graph for this function:

virtual BaseStream* BaseStream::getBaseStream ( ) [inline, virtual, inherited]

Implements Stream.

Definition at line 136 of file Stream.h.

{ return this; }
int EmbedStream::getChar ( ) [virtual]

Implements Stream.

Definition at line 807 of file Stream.cc.

                         {
  if (limited && !length) {
    return EOF;
  }
  --length;
  return str->getChar();
}

Here is the call graph for this function:

virtual Dict* BaseStream::getDict ( ) [inline, virtual, inherited]

Implements Stream.

Definition at line 137 of file Stream.h.

{ return dict.getDict(); }

Here is the call graph for this function:

virtual StreamKind EmbedStream::getKind ( ) [inline, virtual]

Implements Stream.

Definition at line 352 of file Stream.h.

{ return str->getKind(); }

Here is the call graph for this function:

char * Stream::getLine ( char *  buf,
int  size 
) [virtual, inherited]

Definition at line 67 of file Stream.cc.

                                         {
  int i;
  int c;

  if (lookChar() == EOF)
    return NULL;
  for (i = 0; i < size - 1; ++i) {
    c = getChar();
    if (c == EOF || c == '\n')
      break;
    if (c == '\r') {
      if ((c = lookChar()) == '\n')
       getChar();
      break;
    }
    buf[i] = c;
  }
  buf[i] = '\0';
  return buf;
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual int EmbedStream::getPos ( ) [inline, virtual]

Implements Stream.

Definition at line 356 of file Stream.h.

{ return str->getPos(); }

Here is the call graph for this function:

GString * Stream::getPSFilter ( int  psLevel,
char *  indent 
) [virtual, inherited]

Reimplemented in RunLengthEncoder, ASCII85Encoder, ASCIIHexEncoder, FixedLengthEncoder, EOFStream, FlateStream, DCTStream, CCITTFaxStream, RunLengthStream, LZWStream, ASCII85Stream, ASCIIHexStream, JPXStream, and JBIG2Stream.

Definition at line 88 of file Stream.cc.

                                                      {
  return new GString();
}

Here is the caller graph for this function:

int Stream::getRawChar ( ) [virtual, inherited]

Reimplemented in FlateStream, and LZWStream.

Definition at line 62 of file Stream.cc.

                       {
  error(-1, "Internal: called getRawChar() on non-predictor stream");
  return EOF;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Implements BaseStream.

Definition at line 826 of file Stream.cc.

                            {
  error(-1, "Internal: called getStart() on EmbedStream");
  return 0;
}

Here is the call graph for this function:

virtual void Stream::ignoreLength ( ) [inline, virtual, inherited]

Reimplemented in FileStream, and FilterStream.

Definition at line 112 of file Stream.h.

{}

Here is the caller graph for this function:

int Stream::incRef ( ) [inline, inherited]

Definition at line 57 of file Stream.h.

{ return ++ref; }
virtual GBool BaseStream::isBinary ( GBool  last = gTrue) [inline, virtual, inherited]

Implements Stream.

Definition at line 135 of file Stream.h.

{ return last; }
virtual GBool Stream::isEncoder ( ) [inline, virtual, inherited]

Reimplemented in RunLengthEncoder, ASCII85Encoder, ASCIIHexEncoder, and FixedLengthEncoder.

Definition at line 103 of file Stream.h.

{ return gFalse; }

Here is the caller graph for this function:

int EmbedStream::lookChar ( ) [virtual]

Implements Stream.

Definition at line 815 of file Stream.cc.

                          {
  if (limited && !length) {
    return EOF;
  }
  return str->lookChar();
}

Here is the call graph for this function:

Stream * EmbedStream::makeSubStream ( Guint  start,
GBool  limitedA,
Guint  lengthA,
Object dictA 
) [virtual]

Implements BaseStream.

Definition at line 801 of file Stream.cc.

                                                             {
  error(-1, "Internal: called makeSubStream() on EmbedStream");
  return NULL;
}

Here is the call graph for this function:

void EmbedStream::moveStart ( int  delta) [virtual]

Implements BaseStream.

Definition at line 831 of file Stream.cc.

                                     {
  error(-1, "Internal: called moveStart() on EmbedStream");
}

Here is the call graph for this function:

virtual void EmbedStream::reset ( ) [inline, virtual]

Implements Stream.

Definition at line 353 of file Stream.h.

{}
void EmbedStream::setPos ( Guint  pos,
int  dir = 0 
) [virtual]

Implements BaseStream.

Definition at line 822 of file Stream.cc.

                                           {
  error(-1, "Internal: called setPos() on EmbedStream");
}

Here is the call graph for this function:


Member Data Documentation

Decrypt* BaseStream::decrypt [protected, inherited]

Definition at line 152 of file Stream.h.

Definition at line 365 of file Stream.h.

Definition at line 364 of file Stream.h.

Definition at line 363 of file Stream.h.


The documentation for this class was generated from the following files: