CartoType API
Classes | Public Types | Public Member Functions | Static Public Member Functions
CartoType::CType1MapDataBase Class Reference

#include <cartotype_type1_map_database.h>

Inheritance diagram for CartoType::CType1MapDataBase:
CartoType::CMapDataBase

List of all members.

Classes

class  CLayerInfo
class  TDataSet
class  TRegion

Public Types

enum  TReadMapObjectStatus {
  EValid, EError, EOutOfBounds, EBadAttribute,
  EBadLabel, EHighestFirstAttributeValueExceeded, EUnsupportedDataType
}
enum  {
  EGlobalTable = 0, ELayerTable = 1, ELabelIndexTable = 2, EProjectionTable30 = 3,
  EProjectionTable = 4, EStringTable = 5, ELowResolutionLayerTable = 6
}

Public Member Functions

CMapDataContextNewContext (TResult &aError)
uint32 GetTableOffset (int32 aTableId) const
CType1MapLabelIndexLabelIndex () const
CType1MapObjectReadMapObject (TResult &aError, TReadMapObjectStatus &aStatus, CMapDataLayer &aLayer, int32 aDefaultFirstAttribute, const CMapDataContext &aContext, CType1MapObject *aOldMapObject)
TRegionRegion (int32 aFilePos)
void SetClip (const TRect &aClip)
const TDataSetGetLayerData (int32 aLayerIndex, int32 aResolution) const

Static Public Member Functions

static CType1MapDataBaseNew (TResult &aError, MInputStream &aInputStream)

Detailed Description

Database for type 1 map files.


Member Enumeration Documentation

anonymous enum

Named table constants.

Status codes returned by ReadMapObject.

Enumerator:
EValid 

A valid map object was returned.

EError 

There was a system error such as a memory allocation failure: the code is in aError.

EOutOfBounds 

The map object was rejected because it was outside the clip bounds.

EBadAttribute 

The map object was rejected because it failed to match an attribute in aCondition->iAttribute.

EBadLabel 

The map object was rejected because it failed to match the label in aCondition->iLabel.

EHighestFirstAttributeValueExceeded 

The map object was rejected because its first attribute exceeded all values required by the search.

EUnsupportedDataType 

The map object was rejected as an unsupported data type.


Member Function Documentation

const CType1MapDataBase::TDataSet * CType1MapDataBase::GetLayerData ( int32  aLayerIndex,
int32  aResolution 
) const

Return the positions of the data for a specific layer.

uint32 CartoType::CType1MapDataBase::GetTableOffset ( int32  aTableId) const [inline]

Return the byte offset in the input data of the specified table. Return 0 if the table doesn't exist.

CType1MapLabelIndex* CartoType::CType1MapDataBase::LabelIndex ( ) const [inline]

Return the label index if it exists.

CType1MapDataBase * CType1MapDataBase::New ( TResult aError,
MInputStream aInputStream 
) [static]

Create new type 1 map database from an input stream and read database information.

CMapDataContext * CType1MapDataBase::NewContext ( TResult aError) [virtual]

Return new context for searching the map database.

Implements CartoType::CMapDataBase.

CType1MapObject * CType1MapDataBase::ReadMapObject ( TResult aError,
TReadMapObjectStatus aStatus,
CMapDataLayer aLayer,
int32  aDefaultFirstAttribute,
const CMapDataContext aContext,
CType1MapObject aOldMapObject 
)

Read the map object at the current position in the input stream and construct it. Return it only if it intersects aClip. Also, return it only if iCondition is null or one of the conditions in iCondition is true. Use aAttributes as a temporary location for the object's attributes before actually constructing the object. It is guaranteed to be large enough. If aOldMapObject is given reuse it if possible.

CType1MapDataBase::TRegion & CType1MapDataBase::Region ( int32  aFilePos)

Return a reference to a cached region, creating a new region object with no known data apart from the file position if necessary. The cache is guaranteed to contain at least one region object, so this function cannot fail.


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