iDRS™ SDK 16
Loading...
Searching...
No Matches
CDocument_interface.h File Reference

Interface for CDocument wrapper. More...

Go to the source code of this file.

Functions

CDocument CDocument_Create (CIDRS argIDRS, IDRS_BOOL const bBlocking, idrs_exception *pargException)
 Creates a new CDocument that uses a CDefaultPageCollection to handle the pages.
 
CDocument CDocument_Create2 (CIDRS argIDRS, idrs_exception *pargException)
 Creates a new CDocument that uses a CDefaultPageCollection to handle the pages.
 
CDocument CDocument_Create3 (IPageCollection argPageCollection, idrs_exception *pargException)
 Creates a new CDocument that uses a custom IPageCollection.
 
IPageCollection CDocument_GetPages (const CDocument argCDocument, idrs_exception *pargException)
 GetPages returns the collection of CPage elements.
 
CDocumentMetadata CDocument_GetMetadata (const CDocument argCDocument, idrs_exception *pargException)
 GetMetadata returns the document's metadata container.
 
void CDocument_SetMetadata (CDocument argCDocument, const CDocumentMetadata argMetadata, idrs_exception *pargException)
 SetMetadata sets the document's metadata.
 
void CDocument_Destroy (CDocument argCDocument, idrs_exception *pargException)
 Destroys a CDocument handle.
 

Detailed Description

Interface for CDocument wrapper.

Function Documentation

◆ CDocument_Create()

CDocument CDocument_Create ( CIDRS  argIDRS,
IDRS_BOOL const  bBlocking,
idrs_exception *  pargException 
)

Creates a new CDocument that uses a CDefaultPageCollection to handle the pages.

The CDefaultPageCollection page has two modes of operation:

  • Non-blocking mode: Pages are added to the collection, then the Writer is called after all pages have been added to generate the output document.
  • Blocking mode: The Writer can be called to start generating the output document while pages are still being added to the collection. If the Writer needs a page that has not been added to the collection yet, it will be put on hold until it is inserted. Once all the pages have been added, the collection must be marked as complete using a flag, so that the Writer knows that it should not wait for additional page.

Note that both modes are thread-safe.

Parameters
argIDRSThe CIDRS instance
bBlockingIf set to 'IDRS_TRUE', enables the blocking mode for the page collection. Set to 'IDRS_FALSE' by default.
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDocument_Create2()

CDocument CDocument_Create2 ( CIDRS  argIDRS,
idrs_exception *  pargException 
)

Creates a new CDocument that uses a CDefaultPageCollection to handle the pages.

The CDefaultPageCollection page has two modes of operation:

  • Non-blocking mode: Pages are added to the collection, then the Writer is called after all pages have been added to generate the output document.
  • Blocking mode: The Writer can be called to start generating the output document while pages are still being added to the collection. If the Writer needs a page that has not been added to the collection yet, it will be put on hold until it is inserted. Once all the pages have been added, the collection must be marked as complete using a flag, so that the Writer knows that it should not wait for additional page.

Note that both modes are thread-safe.

Parameters
argIDRSThe CIDRS instance
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDocument_Create3()

CDocument CDocument_Create3 ( IPageCollection  argPageCollection,
idrs_exception *  pargException 
)

Creates a new CDocument that uses a custom IPageCollection.

Parameters
argPageCollectionInstance that implements the IPageCollection interface.
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDocument_Destroy()

void CDocument_Destroy ( CDocument  argCDocument,
idrs_exception *  pargException 
)

Destroys a CDocument handle.

Parameters
argCDocumentCDocument handle to destroy
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDocument_GetMetadata()

CDocumentMetadata CDocument_GetMetadata ( const CDocument  argCDocument,
idrs_exception *  pargException 
)

GetMetadata returns the document's metadata container.

Returns
The CDocumentMetadata instance containing the document level metadata.
Parameters
argCDocumentCDocument handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDocument_GetPages()

IPageCollection CDocument_GetPages ( const CDocument  argCDocument,
idrs_exception *  pargException 
)

GetPages returns the collection of CPage elements.

Returns
The IPageCollection instance where the document's pages are stored.
Parameters
argCDocumentCDocument handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDocument_SetMetadata()

void CDocument_SetMetadata ( CDocument  argCDocument,
const CDocumentMetadata  argMetadata,
idrs_exception *  pargException 
)

SetMetadata sets the document's metadata.

Parameters
argCDocumentCDocument handle
argMetadataThe metadata to be assigned to the document
pargExceptionPointer to exception structure that will be filled if an exception occurs