当前位置: 首页>>代码示例>>C++>>正文


C++ TypeInfo::SetType方法代码示例

本文整理汇总了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");
//.........这里部分代码省略.........
开发者ID:bolidehi,项目名称:libosmscout,代码行数:101,代码来源:TypeConfig.cpp

示例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);
  }
开发者ID:dotevo,项目名称:sosmscout,代码行数:70,代码来源:TypeConfig.cpp


注:本文中的TypeInfo::SetType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。