ArcGIS Procedural Runtime
3.2.10650
|
#include <Callbacks.h>
Public Types | |
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 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) |
Callbacks are used to return data such as errors or reports during generation, to lookup coordinates dependent on the client's coordinate system and to report progress and query for cancelation.
A client must either use one of the provided implementations (FileOutputHandler, MemoryOutputHandler) or implement this interface in order to use the generate() functions.
An instance of a Callbacks subclass is instantiated & destroyed by the client. It usually lives for a number of sequential generate() calls. All member functions must be thread-safe (can be called simultaneously by a number of internal threads). One instance of a Callbacks must not be used by more than one concurrent generate() calls.
Geographical coordinates which might be looked up by cga.
|
pure virtual |
Reports to the client that one of the assets used by the rule was erroneous. Called by com.esri.prt.core.CGAErrorEncoder (potentially by any encoder).
isIndex | Initial shape index (relative to the initialShapes array in the generate() call) |
level | Error/warning/info. |
key | The asset's key (symbolic name) into the initial shape's ResolveMap. |
uri | The asset's URI from the initial shape's ResolveMap. |
message | An error message. |
|
pure virtual |
Reports the value of an evaluated attribute to the client. Called by com.esri.prt.core.AttributeEvalEncoder (potentially by any encoder).
isIndex | Initial shape index (relative to the initialShapes array in the generate() call) |
shapeID | Unique shape id to identify the shape in the shape tree. See prtx::Shape. |
key | The key of the attribute. |
value | The evaluated value. |
|
pure virtual |
Reports the value of an evaluated attribute to the client. Called by com.esri.prt.core.AttributeEvalEncoder (potentially by any encoder).
isIndex | Initial shape index (relative to the initialShapes array in the generate() call) |
shapeID | Unique shape id to identify the shape in the shape tree. See prtx::Shape. |
key | The key of the attribute. |
ptr | Pointer to the array. |
size | Size of the array. |
nRows | Number of rows in the array. This is 1 for 1d arrays. CGA arrays can actually be 2d! |
|
pure virtual |
Reports the value of an evaluated attribute to the client. Called by com.esri.prt.core.AttributeEvalEncoder (potentially by any encoder).
isIndex | Initial shape index (relative to the initialShapes array in the generate() call) |
shapeID | Unique shape id to identify the shape in the shape tree. See prtx::Shape. |
key | The key of the attribute. |
value | The evaluated value. |
|
pure virtual |
Reports the value of an evaluated attribute to the client. Called by com.esri.prt.core.AttributeEvalEncoder (potentially by any encoder).
isIndex | Initial shape index (relative to the initialShapes array in the generate() call) |
shapeID | Unique shape id to identify the shape in the shape tree. See prtx::Shape. |
key | The key of the attribute. |
ptr | Pointer to the array. |
size | Size of the array. |
nRows | Number of rows in the array. This is 1 for 1d arrays. CGA arrays can actually be 2d! |
|
pure virtual |
Reports the value of an evaluated attribute to the client. Called by com.esri.prt.core.AttributeEvalEncoder (potentially by any encoder).
isIndex | Initial shape index (relative to the initialShapes array in the generate() call) |
shapeID | Unique shape id to identify the shape in the shape tree. See prtx::Shape. |
key | The key of the attribute. |
value | The evaluated value. |
|
pure virtual |
Reports the value of an evaluated attribute to the client. Called by com.esri.prt.core.AttributeEvalEncoder (potentially by any encoder).
isIndex | Initial shape index (relative to the initialShapes array in the generate() call) |
shapeID | Unique shape id to identify the shape in the shape tree. See prtx::Shape. |
key | The key of the attribute. |
ptr | Pointer to the array. |
size | Size of the array. |
nRows | Number of rows in the array. This is 1 for 1d arrays. CGA arrays can actually be 2d! |
|
pure virtual |
Reports to the client that a runtime cga error occuried during generation of a model. Called by com.esri.prt.core.CGAErrorEncoder (potentially by any encoder).
isIndex | Initial shape index (relative to the initialShapes array in the generate() call) |
shapeID | Unique shape id to identify the shape in the shape tree. See prtx::Shape. |
level | Error/warning/info. |
methodId | CGB-internal method id in which the error occurred. |
pc | SPU-internal program counter at which the error occured. |
message | An error message. |
|
virtual |
Function to convert world coordinates from the cga coordinate system (right handed y-up, meters) to a Cartesian scene coordinate system, geographical WGS84 coordinates or client-dependent layer coordinates. Note: The conversion to WGS84 coordinates is only correct if the input is in Web Mercator coordinates.
Some cga functions (getGeoCord) rely on this. Additionally, some encoders use this functioanlity as well.
isIndex | Initial shape index (relative to the initialShapes array in the generate() call) | |
sel | Selector for the desired coordinate. | |
x | X world coordinate in cga system. | |
y | Y world coordinate in cga system. | |
z | Z world coordinate in cga system. | |
[out] | stat | Optional pointer to return the status. |
|
pure virtual |
Reports to the client that a cga print operation/function was called during generation of a model. Called by com.esri.prt.core.CGAPrintEncoder (potentially by any encoder).
isIndex | Initial shape index (relative to the initialShapes array in the generate() call) |
shapeID | Unique shape id to identify the shape in the shape tree. See prtx::Shape. |
txt | The printed text. |
|
pure virtual |
Reports to the client that a cga report operation was called during generation of a model. Called by com.esri.prt.core.CGAReportEncoder (potentially by any encoder).
isIndex | Initial shape index (relative to the initialShapes array in the generate() call) |
shapeID | Unique shape id to identify the shape in the shape tree. See prtx::Shape. |
key | The key in the report operation. |
value | The value in the report operation. |
|
pure virtual |
Reports to the client that a cga report operation was called during generation of a model. Called by com.esri.prt.core.CGAReportEncoder (potentially by any encoder).
isIndex | Initial shape index (relative to the initialShapes array in the generate() call) |
shapeID | Unique shape id to identify the shape in the shape tree. See prtx::Shape. |
key | The key in the report operation. |
value | The value in the report operation. |
|
pure virtual |
Reports to the client that a cga report operation was called during generation of a model. Called by com.esri.prt.core.CGAReportEncoder (potentially by any encoder).
isIndex | Initial shape index (relative to the initialShapes array in the generate() call) |
shapeID | Unique shape id to identify the shape in the shape tree. See prtx::Shape. |
key | The key in the report operation. |
value | The value in the report operation. |
|
pure virtual |
Reports to the client that an application error occurred during generation of one of the initial shapes.
isIndex | Initial shape index (relative to the initialShapes array in the generate() call) |
status | The erroneous status encountered during generation / encoding of the initial shape. |
message | An error message. |
|
virtual |
Called during the generation() call. Called at least once for every initial shape in the generate() call. Allows the client to abort the generate process.
percentageCompleted | A value in [0, 100] |