#include <PdfVecObjects.h>
Public Member Functions | |
PdfVecObjects () | |
PdfDocument * | GetParentDocument () const |
void | SetParentDocument (PdfDocument *pDocument) |
void | SetAutoDelete (bool bAutoDelete) |
bool | AutoDelete () const |
void | Clear () |
size_t | GetSize () const |
size_t | GetObjectCount () const |
PdfObject * | GetObject (const PdfReference &ref) const |
size_t | GetIndex (const PdfReference &ref) const |
PdfObject * | RemoveObject (const PdfReference &ref, bool bMarkAsFree=true) |
PdfObject * | RemoveObject (const TIVecObjects &it) |
PdfObject * | CreateObject (const char *pszType=NULL) |
PdfObject * | CreateObject (const PdfVariant &rVariant) |
void | AddFreeObject (const PdfReference &rReference) |
const TPdfReferenceList & | GetFreeObjects () const |
void | RenumberObjects (PdfObject *pTrailer, TPdfReferenceSet *pNotDelete=NULL, bool bDoGarbageCollection=false) |
void | push_back (PdfObject *pObj) |
void | insert_sorted (PdfObject *pObj) |
void | Sort () |
void | Reserve (size_t size) |
void | GetObjectDependencies (const PdfObject *pObj, TPdfReferenceList *pList) const |
void | Attach (Observer *pObserver) |
void | Detach (Observer *pObserver) |
void | SetStreamFactory (StreamFactory *pFactory) |
PdfStream * | CreateStream (PdfObject *pParent) |
PdfStream * | CreateStream (const PdfStream &rhs) |
void | WriteObject (PdfObject *pObject) |
void | Finish () |
void | BeginAppendStream (const PdfStream *pStream) |
void | EndAppendStream (const PdfStream *pStream) |
TIVecObjects | begin () |
TCIVecObjects | begin () const |
TIVecObjects | end () |
TCIVecObjects | end () const |
PdfObject * | GetBack () |
void | CollectGarbage (PdfObject *pTrailer) |
std::string | GetNextSubsetPrefix () |
The PdfWriter class contrary creates a PdfVecObjects internally and writes it to a PDF file later with an appropriate table of contents.
These class contains also advanced funtions for searching of PdfObject's in a PdfVecObject.
|
Default constuctor |
|
Mark a reference as unused so that it can be reused for new objects.
|
|
Attach a new observer
|
|
|
|
Iterator pointing at the begining of the vector
|
|
Iterator pointing at the begining of the vector
|
|
Every stream implementation has to call this in BeginAppend
|
|
Removes all objects from the vector and resets it to the default state. If SetAutoDelete is true all objects are deleted. All observers are removed from the vector.
|
|
Deletes all objects that are not references by other objects besides the trailer (which references the root dictionary, which in turn should reference all other objects).
|
|
Creates a new object (of type rVariants) and inserts it into the vector. This function assigns the next free object number to the PdfObject.
|
|
Creates a new object and inserts it into the vector. This function assigns the next free object number to the PdfObject.
|
|
Creates a stream object by copying an existing stream
|
|
Creates a stream object This method is a factory for PdfStream objects.
|
|
Detach an observer.
|
|
Iterator pointing at the end of the vector
|
|
Iterator pointing at the end of the vector
|
|
Every stream implementation has to call this in EndAppend
|
|
Call whenever a document is finished |
|
Get the last object in the vector
|
|
|
|
Finds the object with the given reference in m_vecOffsets and returns the index to it.
|
|
Get next unique subset-prefix
|
|
Finds the object with the given reference in m_vecOffsets and returns a pointer to it if it is found.
|
|
|
|
Get a set with all references of objects that the passed object depends on.
|
|
|
|
|
|
Insert an object into this vector so that the vector remains sorted w.r.t. the ordering based on object and generation numbers m_bObjectCount will be increased for the object. Note: Assumes the vector is sorted, otherwise equivalent to push_back
|
|
Insert a object into this vector. Overwritten from std::vector so that m_bObjectCount can be increased for each object.
|
|
Remove the object with the iterator it from the vector and return it
|
|
Remove the object with the given object and generation number from the list of objects. The object is returned if it was found. Otherwise NULL is returned. The caller has to delete the object by hisself.
|
|
Renumbers all objects according to there current position in the vector. All references remain intact. Warning! This function is _very_ calculation intensive.
|
|
Causes the internal vector to reserve space for size elements.
|
|
Enable/disable auto deletion. By default auto deletion is disabled.
|
|
Sets a parent document of this vector
|
|
Sets a StreamFactory which is used whenever CreateStream is called.
|
|
Sort the objects in the vector based on their object and generation numbers |
|
Can be called to force objects to be written to disk.
|