Mako 7.5.0 API
Loading...
Searching...
No Matches
JawsMako::IPDFObject Class Referenceabstract

Abstract interface for a PDF internal object and common interfaces. All non-composite objects are immutable. All PDF objects are hashable. More...

#include <pdfobjects.h>

Inheritance diagram for JawsMako::IPDFObject:

Public Member Functions

virtual ePDFObjectType getType () const =0
 Get the type of this PDF object.
 
virtual IPDFObjectPtr clone () const =0
 Create a clone of this PDF object if appropriate. Note that simple immutable objects are not actually cloned and instead the same object is returned.
 
virtual IPDFObjectPtr deepClone () const =0
 Create a deep clone of this PDF object if appropriate. Note that simple immutable objects are not actually cloned and instead the same object is returned. If the object is composite (an IPDFArray, IPDFDictionary or IPDFStream) then the object will be cloned as well as the consituent objects in a recursive fashion.
 
virtual bool getIsExecutable () const =0
 Get whether or not the object is considered executable, such as an executable name, array, or operator.
 
virtual bool containsReferences () const =0
 Get whether or not the object contains indirect references to other objects (that is, does the object or any constituent object contain IPDFReference or IPDFFarReference objects).
 
virtual void emitPostScriptCode (const IOutputStreamPtr &dest) const =0
 Convert the object to PostScript code and write to the given stream. Only allowed for objects that are representable in PostScript.
 
virtual bool getNumber (double &number) const =0
 If the object is a number (a real or integer) obtain that number.
 
virtual bool getNumber (float &number) const =0
 If the object is a number (a real or integer) within the range of a 32-bit float, obtain that number. If the object is an integer, thiw will fail if the integer cannot be represented exactly in a single precision float.
 
virtual bool getNumber (int32 &number) const =0
 If the object is an integer (a integral real or integer) within the range of a 32-bit integer, obtain that number.
 
virtual bool getString (RawString &string) const =0
 If the object is a string or a name, retrieve the raw string data.
 
- Public Member Functions inherited from IRCObject
virtual void addRef () const =0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef () const =0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to.
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to.
 
- Public Member Functions inherited from JawsMako::IHashable
virtual uint64 hash () const
 Obtain a 64-bit hash of the receiving object.
 
virtual void updateHash (uint64 &hash) const =0
 Update the given hash to include the receiver.
 

Static Public Member Functions

static JAWSMAKO_API IPDFObjectPtr createNumber (double number)
 If the given number is an integer, create an IPDFInteger, otherwise create an IPDFReal.
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

Abstract interface for a PDF internal object and common interfaces. All non-composite objects are immutable. All PDF objects are hashable.

Member Function Documentation

◆ clone()

virtual IPDFObjectPtr JawsMako::IPDFObject::clone ( ) const
pure virtual

Create a clone of this PDF object if appropriate. Note that simple immutable objects are not actually cloned and instead the same object is returned.

Returns
IPDFObjectPtr The cloned object, or simply the object if immutable.

◆ containsReferences()

virtual bool JawsMako::IPDFObject::containsReferences ( ) const
pure virtual

Get whether or not the object contains indirect references to other objects (that is, does the object or any constituent object contain IPDFReference or IPDFFarReference objects).

Returns
bool True if one or more reference objects are found, false otherwise.

◆ createNumber()

static JAWSMAKO_API IPDFObjectPtr JawsMako::IPDFObject::createNumber ( double number)
static

If the given number is an integer, create an IPDFInteger, otherwise create an IPDFReal.

Parameters
numberThe number to create the object for.
Returns
IPDFObjectPtr Either an IPDFReal or an IPDFInteger as appropriate.

◆ deepClone()

virtual IPDFObjectPtr JawsMako::IPDFObject::deepClone ( ) const
pure virtual

Create a deep clone of this PDF object if appropriate. Note that simple immutable objects are not actually cloned and instead the same object is returned. If the object is composite (an IPDFArray, IPDFDictionary or IPDFStream) then the object will be cloned as well as the consituent objects in a recursive fashion.

Returns
IPDFObjectPtr The cloned object, or simply the object if immutable.

◆ getIsExecutable()

virtual bool JawsMako::IPDFObject::getIsExecutable ( ) const
pure virtual

Get whether or not the object is considered executable, such as an executable name, array, or operator.

Returns
bool True if the object is executable, false otherwise

◆ getNumber() [1/3]

virtual bool JawsMako::IPDFObject::getNumber ( double & number) const
pure virtual

If the object is a number (a real or integer) obtain that number.

Parameters
numberA reference to receive the number
Returns
bool Returns true if the object is a number, false otherwise (in which case the value of number is undefined)

◆ getNumber() [2/3]

virtual bool JawsMako::IPDFObject::getNumber ( float & number) const
pure virtual

If the object is a number (a real or integer) within the range of a 32-bit float, obtain that number. If the object is an integer, thiw will fail if the integer cannot be represented exactly in a single precision float.

Parameters
numberA reference to receive the number
Returns
bool Returns true if the object is such a number, false otherwise (in which case the value of number is undefined)

◆ getNumber() [3/3]

virtual bool JawsMako::IPDFObject::getNumber ( int32 & number) const
pure virtual

If the object is an integer (a integral real or integer) within the range of a 32-bit integer, obtain that number.

Parameters
numberA reference to receive the number
Returns
bool Returns true if the object is such a number, false otherwise (in which case the value of number is undefined)

◆ getString()

virtual bool JawsMako::IPDFObject::getString ( RawString & string) const
pure virtual

If the object is a string or a name, retrieve the raw string data.

Parameters
stringA reference to receive the string.
Returns
bool Returns true if the object is a name or string, false otherwise (in which case string will be undefined).

◆ getType()

virtual ePDFObjectType JawsMako::IPDFObject::getType ( ) const
pure virtual

Get the type of this PDF object.

Returns
ePDFObjectType The type of this object

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