本文整理汇总了C++中TypeInfo::SetType方法的典型用法代码示例。如果您正苦于以下问题:C++ TypeInfo::SetType方法的具体用法?C++ TypeInfo::SetType怎么用?C++ TypeInfo::SetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TypeInfo
的用法示例。
在下文中一共展示了TypeInfo::SetType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: nextTagId
TypeConfig::TypeConfig()
: nextTagId(0),
nextTypeId(0)
{
// Make sure, that this is always registered first.
// It assures that id 0 is always reserved for tagIgnore
RegisterTagForInternalUse("");
RegisterTagForExternalUse("name");
RegisterTagForExternalUse("ref");
RegisterTagForExternalUse("bridge");
RegisterTagForExternalUse("tunnel");
RegisterTagForExternalUse("layer");
RegisterTagForExternalUse("type");
RegisterTagForExternalUse("width");
RegisterTagForExternalUse("oneway");
RegisterTagForExternalUse("addr:housenumber");
RegisterTagForExternalUse("addr:street");
RegisterTagForExternalUse("junction");
RegisterTagForExternalUse("maxspeed");
RegisterTagForExternalUse("restriction");
RegisterTagForExternalUse("surface");
RegisterTagForExternalUse("tracktype");
RegisterTagForExternalUse("place");
RegisterTagForExternalUse("place_name");
RegisterTagForExternalUse("boundary");
RegisterTagForExternalUse("admin_level");
RegisterTagForExternalUse("access");
RegisterTagForExternalUse("access:foward");
RegisterTagForExternalUse("access:backward");
RegisterTagForExternalUse("access:foot");
RegisterTagForExternalUse("access:foot:foward");
RegisterTagForExternalUse("access:foot:backward");
RegisterTagForExternalUse("access:bicycle");
RegisterTagForExternalUse("access:bicycle:foward");
RegisterTagForExternalUse("access:bicycle:backward");
RegisterTagForExternalUse("access:motor_vehicle");
RegisterTagForExternalUse("access:motor_vehicle:foward");
RegisterTagForExternalUse("access:motor_vehicle:backward");
RegisterTagForExternalUse("access:motorcar");
RegisterTagForExternalUse("access:motorcar:foward");
RegisterTagForExternalUse("access:motorcar:backward");
RegisterTagForInternalUse("area");
RegisterTagForInternalUse("natural");
TypeInfo ignore;
TypeInfo route;
TypeInfo tileLand;
TypeInfo tileSea;
TypeInfo tileCoast;
TypeInfo tileUnknown;
TypeInfo tileCoastline;
// Make sure, that this is always registered first.
// It assures that id 0 is always reserved for typeIgnore
ignore.SetType("");
AddTypeInfo(ignore);
// Internal type for showing routes
route.SetType("_route")
.CanBeWay(true);
// Internal types for the land/sea/coast tiles building the base layer for map drawing
tileLand.SetType("_tile_land")
.CanBeArea(true);
tileSea.SetType("_tile_sea")
.CanBeArea(true);
tileCoast.SetType("_tile_coast")
.CanBeArea(true);
tileUnknown.SetType("_tile_unknown")
.CanBeArea(true);
tileCoastline.SetType("_tile_coastline")
.CanBeWay(true);
AddTypeInfo(route);
AddTypeInfo(tileLand);
AddTypeInfo(tileSea);
AddTypeInfo(tileCoast);
AddTypeInfo(tileUnknown);
AddTypeInfo(tileCoastline);
typeTileLand=GetTypeId("_tile_land");
typeTileSea=GetTypeId("_tile_sea");
typeTileCoast=GetTypeId("_tile_coast");
typeTileUnknown=GetTypeId("_tile_unknown");
typeTileCoastline=GetTypeId("_tile_coastline");
tagRef=GetTagId("ref");
tagBridge=GetTagId("bridge");
tagTunnel=GetTagId("tunnel");
tagLayer=GetTagId("layer");
tagType=GetTagId("type");
tagWidth=GetTagId("width");
//.........这里部分代码省略.........
示例2: nextTagId
TypeConfig::TypeConfig()
: nextTagId(0),
nextTypeId(0)
{
// Make sure, that this is always registered first.
// It assures that id 0 is always reserved for tagIgnore
RegisterTagForInternalUse("");
RegisterTagForExternalUse("admin_level");
RegisterTagForExternalUse("boundary");
RegisterTagForExternalUse("bridge");
RegisterTagForExternalUse("highway");
RegisterTagForExternalUse("layer");
RegisterTagForExternalUse("name");
RegisterTagForExternalUse("natural");
RegisterTagForExternalUse("oneway");
RegisterTagForExternalUse("place");
RegisterTagForExternalUse("place_name");
RegisterTagForExternalUse("ref");
RegisterTagForExternalUse("restriction");
RegisterTagForExternalUse("tunnel");
RegisterTagForExternalUse("type");
RegisterTagForExternalUse("width");
RegisterTagForExternalUse("area");
RegisterTagForExternalUse("addr:housenumber");
TypeInfo ignore;
TypeInfo route;
// Make sure, that this is always registered first.
// It assures that id 0 is always reserved for typeIgnore
ignore.SetType("");
AddTypeInfo(ignore);
route.SetType("_route")
.CanBeWay(true);
AddTypeInfo(route);
tagAdminLevel=GetTagId("admin_level");
tagBoundary=GetTagId("boundary");
tagBridge=GetTagId("bridge");
tagLayer=GetTagId("layer");
tagName=GetTagId("name");
tagOneway=GetTagId("oneway");
tagPlace=GetTagId("place");
tagPlaceName=GetTagId("place_name");
tagRef=GetTagId("ref");
tagTunnel=GetTagId("tunnel");
tagType=GetTagId("type");
tagWidth=GetTagId("width");
tagArea=GetTagId("area");
tagHouseNr=GetTagId("addr:housenumber");
assert(tagAdminLevel!=tagIgnore);
assert(tagBoundary!=tagIgnore);
assert(tagBridge!=tagIgnore);
assert(tagLayer!=tagIgnore);
assert(tagName!=tagIgnore);
assert(tagOneway!=tagIgnore);
assert(tagPlace!=tagIgnore);
assert(tagPlaceName!=tagIgnore);
assert(tagRef!=tagIgnore);
assert(tagTunnel!=tagIgnore);
assert(tagType!=tagIgnore);
assert(tagWidth!=tagIgnore);
assert(tagArea!=tagIgnore);
assert(tagHouseNr!=tagIgnore);
}