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

#include <ResolveMap.h>

Inheritance diagram for prt::ResolveMap:
[legend]

Public Member Functions

virtual const wchar_t * findCGBKey (Status *stat=nullptr) const =0
 
virtual const wchar_t ** findCGBKeys (const wchar_t **result, size_t *resultSize, Status *stat=nullptr) const =0
 
virtual wchar_t * searchKey (const wchar_t *project, const wchar_t *query, wchar_t *result, size_t *resultSize, Status *stat=nullptr) const =0
 
- Public Member Functions inherited from prt::Attributable
virtual bool getBool (const wchar_t *key, Status *stat=0) const =0
 
virtual const bool * getBoolArray (const wchar_t *key, size_t *count, Status *stat=0) const =0
 
virtual double getFloat (const wchar_t *key, Status *stat=0) const =0
 
virtual const double * getFloatArray (const wchar_t *key, size_t *count, Status *stat=0) const =0
 
virtual int32_t getInt (const wchar_t *key, Status *stat=0) const =0
 
virtual const int32_t * getIntArray (const wchar_t *key, size_t *count, Status *stat=0) const =0
 
virtual const wchar_t *const * getKeys (size_t *count, Status *stat=0) const =0
 
virtual const wchar_t * getString (const wchar_t *key, Status *stat=0) const =0
 
virtual const wchar_t *const * getStringArray (const wchar_t *key, size_t *count, Status *stat=0) const =0
 
virtual PrimitiveType getType (const wchar_t *key, Status *stat=0) const =0
 
virtual bool hasKey (const wchar_t *key, Status *stat=0) const =0
 
- Public Member Functions inherited from prt::Object
void destroy () const
 
virtual char * toXML (char *result, size_t *resultSize, Status *stat=0) const =0
 
char * toXMLDocument (char *result, size_t *resultSize, Status *stat=0) const
 

Additional Inherited Members

- Public Types inherited from prt::Attributable
enum  PrimitiveType {
  PT_UNDEFINED,
  PT_STRING,
  PT_FLOAT,
  PT_BOOL,
  PT_INT,
  PT_STRING_ARRAY,
  PT_FLOAT_ARRAY,
  PT_BOOL_ARRAY,
  PT_INT_ARRAY,
  PT_BLIND_DATA,
  PT_BLIND_DATA_ARRAY,
  PT_COUNT
}
 
- Protected Member Functions inherited from prt::Object
 Object (const Object &)
 

Detailed Description

A ResolveMap maps an arbitrary string key to an URI. Resolve maps are used for asset lookups during CGA generation (e.g. i() and texture() operations). Use the getString() member function derived from the Attributable interface to lookup a key (i.e. get it's URI). Typically, a ResolveMap gets created from a RPK with the createResolveMap() function. ResolveMaps can be stacked, i.e. a map can be put in place downstream.

See also
ResolveMapBuilder, prtx::ResolveMap, createResolveMap()

Member Function Documentation

◆ findCGBKey()

virtual const wchar_t* prt::ResolveMap::findCGBKey ( Status stat = nullptr) const
pure virtual

Finds the key of the single cgb file in the ResolveMap. RPKs contain exactly one main rule file (= the cgb file) - use this function to find it. This key can then be set as an Initial Shape's ruleFile. The according URI can be obtained from the ResolveMap with getString(cgbKey).

Note: It is possible that the CGA compiler generates more than one cgb file which are all put into the RPK and the according ResolveMap. However, only one of them, the main cgb, can actually be used to generate models. This main cgb is found by this function. The other cgbs are essential for the main cgb file to work but do not work on their own.

Parameters
[out]statOptional pointer to return the status.
Returns
pointer to the key of the cgb file or nullptr in case of error. The pointer stays valid as long as the ResolveMap instance exists.

◆ findCGBKeys()

virtual const wchar_t** prt::ResolveMap::findCGBKeys ( const wchar_t **  result,
size_t *  resultSize,
Status stat = nullptr 
) const
pure virtual

Finds all main cgb keys. While RPKs only contain exactly one rule file, ResolveMaps can in general be set to contain multiple rule files. In such cases findCGBKeys() can be used to collect all keys of main rule files.

Parameters
[in,out]resultArray to receive pointers to the keys. The pointers stay valid as long as the ResolveMap instance exists. If more cgbs than resultSize are found, only the first few are written to results and STATUS_BUFFER_TO_SMALL is written to stat.
[in,out]resultSizeSize of the result array, will receive the number of cgbs found.
[out]statOptional pointer to return the status.
Returns
result

◆ searchKey()

virtual wchar_t* prt::ResolveMap::searchKey ( const wchar_t *  project,
const wchar_t *  query,
wchar_t *  result,
size_t *  resultSize,
Status stat = nullptr 
) const
pure virtual

Searches the keys in the ResolveMap for the expression defined in query. Supported search queries include wildcards, regular expressions and file properties.

This implements the CGA fileSearch() function. This function is thread-safe. If the result does not fit into the allocated buffer, the result is truncated. The INOUT parameter resultSize must be compared to the original buffer size after the call to detect this situation.

Parameters
projectThe name of the current project ("projects" are "subfolders" in the resolve map starting with a '/').
queryThe search query. See the CGA fileSearch() function for syntax documentation.
[in,out]resultPointer to buffer to receive a string which contains the semicolon separated list of keys
[in,out]resultSizePointer to size of reserved buffer; receives the size of the actual result (incl. terminating 0). Must be >= 1.
[out]statOptional pointer to return the status.
Returns
result.

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