InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PDFVTUtils Class Reference

#include <PDFVTUtils.h>

Public Types

enum  Encoding {
  kUTF16LE, kUTF16BE, kUTF8BOM, kUTF8NOBOM,
  kUnsupportedEncoding
}
 

Static Public Member Functions

template<class T >
static std::string ToString (const T &t)
 
static void GetDataSourceKeyList (std::vector< std::string > &keyList, const WideString &filePath)
 
static bool16 ReadDataSource (const WideString &filePath, std::vector< std::string > &keyList, std::queue< std::vector< std::string > > &recordList)
 
static Encoding DetectEncoding (IPMStream *stream)
 

Detailed Description

From SDK sample; Utility class for PDFVT.

Member Function Documentation

PDFVTUtils::Encoding PDFVTUtils::DetectEncoding (IPMStreamstream)
static

Detects the encoding of the given stream for the file.

Parameters
streamIN IPMStream for the file.
Returns
File encoding.
void PDFVTUtils::GetDataSourceKeyList (std::vector< std::string > & keyList,
const WideStringfilePath 
)
static

Reads the datasource file and retrieves the key list.

Parameters
keyListOUT The key list in the datasource file.
filePathIN Path to the datasource file.
bool16 PDFVTUtils::ReadDataSource (const WideStringfilePath,
std::vector< std::string > & keyList,
std::queue< std::vector< std::string > > & recordList 
)
static

Reads and parses data from extenal datasource file.

Parameters
filePathIN Path to the datasource file.
keyListOUT The key list in the datasource file.
recordListOUT The record list in the data source file.
Returns
kTrue if the datasource file is opened successfully, kFalse otherwise.
template<class T >
static std::string PDFVTUtils::ToString (const T & t)
inlinestatic

Converts an object of type T into a string.

Parameters
tIN Object of type T.
Returns
String representation of object t.