ArcGIS Procedural Runtime  3.2.10650
List of all members | Public Types | Public Member Functions
prt::SimpleOutputCallbacks Class Referenceabstract

#include <Callbacks.h>

Inheritance diagram for prt::SimpleOutputCallbacks:
[legend]

Public Types

enum  OpenMode {
  OPENMODE_ALWAYS,
  OPENMODE_IF_NOT_EXISTING
}
 
enum  SeekOrigin {
  SO_BEGIN,
  SO_CURRENT,
  SO_END
}
 
enum  StringEncoding {
  SE_NATIVE,
  SE_UTF8,
  SE_UTF16
}
 
- Public Types inherited from prt::Callbacks
enum  Continuation {
  CONTINUE,
  CANCEL_AND_FINISH,
  CANCEL_ASAP
}
 
enum  CoordSelector {
  PROJ_X,
  PROJ_Y,
  WGS84_LAT,
  WGS84_LON,
  WGS84_ALT_METER,
  LAYER_X,
  LAYER_Y,
  LAYER_Z
}
 

Public Member Functions

virtual bool canSeek () const =0
 
virtual Status close (uint64_t handle, const size_t *isIndices, size_t isCount)=0
 
virtual Status closeCGAError ()=0
 
virtual Status closeCGAPrint ()=0
 
virtual Status closeCGAReport ()=0
 
virtual Status logStats (uint64_t handle, const size_t *isIndices, size_t isCount, ContentType contentType, const prt::AttributeMap *stats)
 
virtual uint64_t open (const wchar_t *encoderId, const ContentType contentType, const wchar_t *name, StringEncoding enc=SE_NATIVE, OpenMode mode=OPENMODE_ALWAYS, prt::Status *stat=0)=0
 
virtual Status openCGAError (const wchar_t *name)=0
 
virtual Status openCGAPrint (const wchar_t *name)=0
 
virtual Status openCGAReport (const wchar_t *name)=0
 
virtual Status seek (uint64_t handle, int64_t offset, SeekOrigin origin)=0
 
virtual uint64_t tell (uint64_t handle, Status *stat=0)=0
 
virtual Status write (uint64_t handle, const wchar_t *string)=0
 
virtual Status write (uint64_t handle, const uint8_t *buffer, size_t size)=0
 
- Public Member Functions inherited from prt::Callbacks
virtual Status assetError (size_t isIndex, CGAErrorLevel level, const wchar_t *key, const wchar_t *uri, const wchar_t *message)=0
 
virtual Status attrBool (size_t isIndex, int32_t shapeID, const wchar_t *key, bool value)=0
 
virtual Status attrBoolArray (size_t isIndex, int32_t shapeID, const wchar_t *key, const bool *ptr, size_t size, size_t nRows)=0
 
virtual Status attrFloat (size_t isIndex, int32_t shapeID, const wchar_t *key, double value)=0
 
virtual Status attrFloatArray (size_t isIndex, int32_t shapeID, const wchar_t *key, const double *ptr, size_t size, size_t nRows)=0
 
virtual Status attrString (size_t isIndex, int32_t shapeID, const wchar_t *key, const wchar_t *value)=0
 
virtual Status attrStringArray (size_t isIndex, int32_t shapeID, const wchar_t *key, const wchar_t *const *ptr, size_t size, size_t nRows)=0
 
virtual Status cgaError (size_t isIndex, int32_t shapeID, CGAErrorLevel level, int32_t methodId, int32_t pc, const wchar_t *message)=0
 
virtual double cgaGetCoord (size_t isIndex, CoordSelector sel, double x, double y, double z, Status *stat=0)
 
virtual Status cgaPrint (size_t isIndex, int32_t shapeID, const wchar_t *txt)=0
 
virtual Status cgaReportBool (size_t isIndex, int32_t shapeID, const wchar_t *key, bool value)=0
 
virtual Status cgaReportFloat (size_t isIndex, int32_t shapeID, const wchar_t *key, double value)=0
 
virtual Status cgaReportString (size_t isIndex, int32_t shapeID, const wchar_t *key, const wchar_t *value)=0
 
virtual Status generateError (size_t isIndex, Status status, const wchar_t *message)=0
 
virtual Continuation progress (float percentageCompleted)
 

Detailed Description

An extension of the Callbacks interface which adds support for basic output. This is basically an abstraction of typical file-IO.

All functions are thread-safe.

See also
FileOutputCallbacks, MemoryOutputCallbacks

Member Enumeration Documentation

◆ OpenMode

Open modes.

Enumerator
OPENMODE_ALWAYS 

Always open.

OPENMODE_IF_NOT_EXISTING 

Only open if not existing.

◆ SeekOrigin

Seek origin.

Enumerator
SO_BEGIN 

Seek at beginning.

SO_CURRENT 

Seek at current position.

SO_END 

Seek at end.

◆ StringEncoding

String encodings.

Enumerator
SE_NATIVE 

Native encoding.

SE_UTF8 

UTF8 encoding.

SE_UTF16 

UTF16 encoding.

Member Function Documentation

◆ canSeek()

virtual bool prt::SimpleOutputCallbacks::canSeek ( ) const
pure virtual
Returns
true if the implementation is seekable, false if not.

◆ close()

virtual Status prt::SimpleOutputCallbacks::close ( uint64_t  handle,
const size_t *  isIndices,
size_t  isCount 
)
pure virtual

Closes an entity.

Parameters
handleHandle of entity.
isIndicesPointer to array of initial shape indices (relative to the array in the generate() call), which contributed to the content in this entity.
isCountNumber of indices in the array.
Returns
status.

◆ logStats()

virtual Status prt::SimpleOutputCallbacks::logStats ( uint64_t  handle,
const size_t *  isIndices,
size_t  isCount,
ContentType  contentType,
const prt::AttributeMap stats 
)
virtual

Passes meta-data about the written entity to the client (e.g. polygon count, mesh names, etc.) All arrays in the meta-data are interepreted as follows: The i-th element of each array belongs to the same object and will be grouped. Therefore all arrays need to have equal length.

Parameters
handleHandle of entity.
isIndicesAll indices that contributed to the contents of this entity
isCountThe length of the array given in isIndices
contentTypeThe type for which meta-data is passed
statsThe meta-data that is passed to the client
Returns
status

◆ open()

virtual uint64_t prt::SimpleOutputCallbacks::open ( const wchar_t *  encoderId,
const ContentType  contentType,
const wchar_t *  name,
StringEncoding  enc = SE_NATIVE,
OpenMode  mode = OPENMODE_ALWAYS,
prt::Status stat = 0 
)
pure virtual

Opens a named entity.

Parameters
encoderIdThe id of the calling encoder.
contentTypeThe content type which will be written.
nameName of the entity.
encOptional encoding which should be applied to written strings.
modeOptional mode for opening the entity.
[out]statOptional pointer to return the status.
Returns
a unique handle to identify

◆ openCGAError()

virtual Status prt::SimpleOutputCallbacks::openCGAError ( const wchar_t *  name)
pure virtual

Opens an entity for cga error reporting.

Parameters
nameThe name of the entity.
Returns
status.

◆ openCGAPrint()

virtual Status prt::SimpleOutputCallbacks::openCGAPrint ( const wchar_t *  name)
pure virtual

Opens an entity where cga print operations/functions write to.

Parameters
nameThe name of the entity.
Returns
status.

◆ openCGAReport()

virtual Status prt::SimpleOutputCallbacks::openCGAReport ( const wchar_t *  name)
pure virtual

Opens an entity where cga report operations write to.

Parameters
nameThe name of the entity.
Returns
status.

◆ seek()

virtual Status prt::SimpleOutputCallbacks::seek ( uint64_t  handle,
int64_t  offset,
SeekOrigin  origin 
)
pure virtual

Sets the position in the entity. Only call this if canSeek() returns true.

Parameters
handleHandle of entity.
offsetOffset in bytes.
originThe offset is relative to the origin.
Returns
status.

◆ tell()

virtual uint64_t prt::SimpleOutputCallbacks::tell ( uint64_t  handle,
Status stat = 0 
)
pure virtual

Returns the position in the entity. Only call this if canSeek() returns true.

Parameters
handleHandle of entity.
[out]statOptional pointer to return the status.
Returns
current position in the entity.

◆ write() [1/2]

virtual Status prt::SimpleOutputCallbacks::write ( uint64_t  handle,
const wchar_t *  string 
)
pure virtual

Write text to an output entity.

Parameters
handleHandle of entity.
stringText to write.
Returns
status.

◆ write() [2/2]

virtual Status prt::SimpleOutputCallbacks::write ( uint64_t  handle,
const uint8_t *  buffer,
size_t  size 
)
pure virtual

Write binary data to an output entity.

Parameters
handleHandle of entity.
bufferPointer to data to write.
sizeSize of data to write in bytes to write.
Returns
status.

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