Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdf/xpdf/Object.h
diff options
context:
space:
mode:
authorMartin Kretzschmar <mkretzschmar@src.gnome.org>2002-09-18 22:20:42 (GMT)
committer Martin Kretzschmar <mkretzschmar@src.gnome.org>2002-09-18 22:20:42 (GMT)
commit2a393c134fe3fe8eb85bf818cb7ad6ae4396322a (patch)
treeeba8b0dcaba42d799ed8313faee15fb74a5a0cd2 /pdf/xpdf/Object.h
parent7aac8dc8533347e21311b15186e0af82f1b22fd6 (diff)
Synched with Xpdf 1.01
Diffstat (limited to 'pdf/xpdf/Object.h')
-rw-r--r--pdf/xpdf/Object.h59
1 files changed, 29 insertions, 30 deletions
diff --git a/pdf/xpdf/Object.h b/pdf/xpdf/Object.h
index fa4f740..65d0be0 100644
--- a/pdf/xpdf/Object.h
+++ b/pdf/xpdf/Object.h
@@ -2,7 +2,7 @@
//
// Object.h
//
-// Copyright 1996 Derek B. Noonburg
+// Copyright 1996-2002 Glyph & Cog, LLC
//
//========================================================================
@@ -19,6 +19,7 @@
#include "gmem.h"
#include "GString.h"
+class XRef;
class Array;
class Dict;
class Stream;
@@ -78,27 +79,25 @@ public:
type(objNone) {}
// Initialize an object.
- Object *initBool(GBool booln1)
- { initObj(objBool); booln = booln1; return this; }
- Object *initInt(int intg1)
- { initObj(objInt); intg = intg1; return this; }
- Object *initReal(double real1)
- { initObj(objReal); real = real1; return this; }
- Object *initString(GString *string1)
- { initObj(objString); string = string1; return this; }
- Object *initName(char *name1)
- { initObj(objName); name = copyString(name1); return this; }
+ Object *initBool(GBool boolnA)
+ { initObj(objBool); booln = boolnA; return this; }
+ Object *initInt(int intgA)
+ { initObj(objInt); intg = intgA; return this; }
+ Object *initReal(double realA)
+ { initObj(objReal); real = realA; return this; }
+ Object *initString(GString *stringA)
+ { initObj(objString); string = stringA; return this; }
+ Object *initName(char *nameA)
+ { initObj(objName); name = copyString(nameA); return this; }
Object *initNull()
{ initObj(objNull); return this; }
- Object *initArray();
- Object *initDict();
- Object *initDict(Dict *dict1)
- { initObj(objDict); dict = dict1; return this; }
- Object *initStream(Stream *stream1);
- Object *initRef(int num1, int gen1)
- { initObj(objRef); ref.num = num1; ref.gen = gen1; return this; }
- Object *initCmd(char *cmd1)
- { initObj(objCmd); cmd = copyString(cmd1); return this; }
+ Object *initArray(XRef *xref);
+ Object *initDict(XRef *xref);
+ Object *initStream(Stream *streamA);
+ Object *initRef(int numA, int genA)
+ { initObj(objRef); ref.num = numA; ref.gen = genA; return this; }
+ Object *initCmd(char *cmdA)
+ { initObj(objCmd); cmd = copyString(cmdA); return this; }
Object *initError()
{ initObj(objError); return this; }
Object *initEOF()
@@ -109,7 +108,7 @@ public:
// If object is a Ref, fetch and return the referenced object.
// Otherwise, return a copy of the object.
- Object *fetch(Object *obj);
+ Object *fetch(XRef *xref, Object *obj);
// Free object contents.
void free();
@@ -133,12 +132,12 @@ public:
GBool isNone() { return type == objNone; }
// Special type checking.
- GBool isName(char *name1)
- { return type == objName && !strcmp(name, name1); }
+ GBool isName(char *nameA)
+ { return type == objName && !strcmp(name, nameA); }
GBool isDict(char *dictType);
GBool isStream(char *dictType);
- GBool isCmd(char *cmd1)
- { return type == objCmd && !strcmp(cmd, cmd1); }
+ GBool isCmd(char *cmdA)
+ { return type == objCmd && !strcmp(cmd, cmdA); }
// Accessors. NB: these assume object is of correct type.
GBool getBool() { return booln; }
@@ -177,8 +176,8 @@ public:
int streamGetChar();
int streamLookChar();
char *streamGetLine(char *buf, int size);
- int streamGetPos();
- void streamSetPos(int pos);
+ Guint streamGetPos();
+ void streamSetPos(Guint pos, int dir = 0);
Dict *streamGetDict();
// Output.
@@ -288,11 +287,11 @@ inline int Object::streamLookChar()
inline char *Object::streamGetLine(char *buf, int size)
{ return stream->getLine(buf, size); }
-inline int Object::streamGetPos()
+inline Guint Object::streamGetPos()
{ return stream->getPos(); }
-inline void Object::streamSetPos(int pos)
- { stream->setPos(pos); }
+inline void Object::streamSetPos(Guint pos, int dir)
+ { stream->setPos(pos, dir); }
inline Dict *Object::streamGetDict()
{ return stream->getDict(); }