1 // Copyright 2008, Google Inc. All rights reserved. 2 // 3 // Redistribution and use in source and binary forms, with or without 4 // modification, are permitted provided that the following conditions are met: 5 // 6 // 1. Redistributions of source code must retain the above copyright notice, 7 // this list of conditions and the following disclaimer. 8 // 2. Redistributions in binary form must reproduce the above copyright notice, 9 // this list of conditions and the following disclaimer in the documentation 10 // and/or other materials provided with the distribution. 11 // 3. Neither the name of Google Inc. nor the names of its contributors may be 12 // used to endorse or promote products derived from this software without 13 // specific prior written permission. 14 // 15 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 16 // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 18 // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 21 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 23 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 24 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 26 // This file defines the id of each element. 27 28 // The element names exactly match the OGC KML 2.2 Standard: 29 // http://www.opengeospatial.org/standards/kml 30 // See also Google's reference especially for the "gx" elements: 31 // http://code.google.com/apis/kml/documentation/kmlreference.html 32 // Type_${element_name} 33 34 #ifndef KML_DOM_KML22_H 35 #define KML_DOM_KML22_H 36 37 namespace kmldom { 38 39 // This list matches kml22_elements_[] exactly: 40 typedef enum { 41 Type_Unknown, 42 43 Type_ColorStyle, 44 Type_Container, 45 Type_Feature, 46 Type_Geometry, 47 Type_AbstractLatLonBox, 48 Type_Object, 49 Type_Overlay, 50 Type_StyleSelector, 51 Type_SubStyle, 52 Type_TimePrimitive, 53 Type_AbstractView, 54 Type_BasicLink, 55 Type_Vec2, 56 57 Type_Alias, 58 Type_BalloonStyle, 59 Type_Camera, 60 Type_Change, 61 Type_Create, 62 Type_Data, 63 Type_Delete, 64 Type_Document, 65 Type_ExtendedData, 66 Type_Folder, 67 Type_GroundOverlay, 68 Type_Icon, 69 Type_IconStyle, 70 Type_IconStyleIcon, 71 Type_ImagePyramid, 72 Type_ItemIcon, 73 Type_LabelStyle, 74 Type_LatLonAltBox, 75 Type_LatLonBox, 76 Type_LineString, 77 Type_LineStyle, 78 Type_LinearRing, 79 Type_Link, 80 Type_ListStyle, 81 Type_Location, 82 Type_Lod, 83 Type_LookAt, 84 Type_Metadata, 85 Type_Model, 86 Type_MultiGeometry, 87 Type_NetworkLink, 88 Type_NetworkLinkControl, 89 Type_Orientation, 90 Type_Pair, 91 Type_PhotoOverlay, 92 Type_Placemark, 93 Type_Point, 94 Type_PolyStyle, 95 Type_Polygon, 96 Type_Region, 97 Type_ResourceMap, 98 Type_Scale, 99 Type_Schema, 100 Type_SchemaData, 101 Type_ScreenOverlay, 102 Type_SimpleData, 103 Type_SimpleField, 104 Type_Snippet, 105 Type_Style, 106 Type_StyleMap, 107 Type_TimeSpan, 108 Type_TimeStamp, 109 Type_Update, 110 Type_Url, 111 Type_ViewVolume, 112 113 Type_address, 114 Type_altitude, 115 Type_altitudeMode, 116 Type_altitudeModeGroup, 117 Type_begin, 118 Type_bgColor, 119 Type_bottomFov, 120 Type_color, 121 Type_colorMode, 122 Type_cookie, 123 Type_coordinates, 124 Type_description, 125 Type_displayMode, 126 Type_displayName, 127 Type_drawOrder, 128 Type_east, 129 Type_end, 130 Type_expires, 131 Type_extrude, 132 Type_fill, 133 Type_flyToView, 134 Type_gridOrigin, 135 Type_heading, 136 Type_hotSpot, 137 Type_href, 138 Type_httpQuery, 139 Type_innerBoundaryIs, 140 Type_key, 141 Type_kml, 142 Type_latitude, 143 Type_leftFov, 144 Type_linkDescription, 145 Type_linkName, 146 Type_linkSnippet, 147 Type_listItemType, 148 Type_longitude, 149 Type_maxAltitude, 150 Type_maxFadeExtent, 151 Type_maxHeight, 152 Type_maxLength, 153 Type_maxLodPixels, 154 Type_maxSessionLength, 155 Type_maxSnippetLines, 156 Type_maxWidth, 157 Type_message, 158 Type_minAltitude, 159 Type_minFadeExtent, 160 Type_minLodPixels, 161 Type_minRefreshPeriod, 162 Type_name, 163 Type_near, 164 Type_north, 165 Type_open, 166 Type_outerBoundaryIs, 167 Type_outline, 168 Type_overlayXY, 169 Type_phoneNumber, 170 Type_range, 171 Type_refreshInterval, 172 Type_refreshMode, 173 Type_refreshVisibility, 174 Type_rightFov, 175 Type_roll, 176 Type_rotation, 177 Type_rotationXY, 178 Type_scale, 179 Type_screenXY, 180 Type_shape, 181 Type_size, 182 Type_snippet, 183 Type_sourceHref, 184 Type_south, 185 Type_state, 186 Type_styleUrl, 187 Type_targetHref, 188 Type_tessellate, 189 Type_text, 190 Type_textColor, 191 Type_tileSize, 192 Type_tilt, 193 Type_topFov, 194 Type_units, 195 Type_value, 196 Type_viewBoundScale, 197 Type_viewFormat, 198 Type_viewRefreshMode, 199 Type_viewRefreshTime, 200 Type_visibility, 201 Type_west, 202 Type_when, 203 Type_width, 204 Type_x, 205 Type_y, 206 Type_z, 207 208 Type_AtomAuthor, 209 Type_AtomCategory, 210 Type_AtomContent, 211 Type_AtomEntry, 212 Type_AtomFeed, 213 Type_AtomLink, 214 215 Type_atomEmail, 216 Type_atomId, 217 Type_atomLabel, 218 Type_atomName, 219 Type_atomScheme, 220 Type_atomSummary, 221 Type_atomTerm, 222 Type_atomTitle, 223 Type_atomUpdated, 224 Type_atomUri, 225 226 Type_XalAddressDetails, 227 Type_XalAdministrativeArea, 228 Type_XalCountry, 229 Type_XalLocality, 230 Type_XalPostalCode, 231 Type_XalSubAdministrativeArea, 232 Type_XalThoroughfare, 233 234 Type_xalAdministrativeAreaName, 235 Type_xalCountryNameCode, 236 Type_xalLocalityName, 237 Type_xalPostalCodeNumber, 238 Type_xalSubAdministrativeAreaName, 239 Type_xalThoroughfareName, 240 Type_xalThoroughfareNumber, 241 242 Type_GxTourPrimitive, 243 244 Type_GxAnimatedUpdate, 245 Type_GxFlyTo, 246 Type_GxLatLonQuad, 247 Type_GxMultiTrack, 248 Type_GxPlaylist, 249 Type_GxSimpleArrayData, 250 Type_GxSimpleArrayField, 251 Type_GxSoundCue, 252 Type_GxTimeSpan, 253 Type_GxTimeStamp, 254 Type_GxTour, 255 Type_GxTourControl, 256 Type_GxTrack, 257 Type_GxWait, 258 259 Type_GxAltitudeMode, 260 Type_GxAngles, 261 Type_GxBalloonVisibility, 262 Type_GxCoord, 263 Type_GxDuration, 264 Type_GxFlyToMode, 265 Type_GxH, 266 Type_GxInterpolate, 267 Type_GxPlayMode, 268 Type_GxValue, 269 Type_GxW, 270 Type_GxX, 271 Type_GxY, 272 273 Type_Invalid 274 } KmlDomType; 275 276 // The value of each enum is the offset to the corresponding string in the 277 // kKml22Enums table. The enum type name here is the element name with first 278 // char folded up to be consistent with the convention of type names starting 279 // with an upper case letter, hence <altitudeMode>'s enum values are of type 280 // AltitudeModeEnum. Each enum value repeats the name of the element with all 281 // chars folded up followed by an underscore followed by the name of the 282 // enumeration value folded to upper case. Thus DOM API code examining a 283 // <LookAt>'s <altitudeMode> might be as follows: 284 // 285 // AltitudeModeEnum altitudemode = lookat->altitudemode(); 286 // switch (altitudemode) { 287 // case ALTITUDEMODE_CLAMPTOGROUND: 288 // ... 289 // case ALTITUDEMODE_RELATIVETOGROUND: 290 // ... 291 // case ALTITUDEMODE_ABSOLUTE 292 // ... 293 // default: 294 // // unknown altitudeMode 295 // }; 296 297 typedef enum { 298 ALTITUDEMODE_CLAMPTOGROUND = 0, 299 ALTITUDEMODE_RELATIVETOGROUND, 300 ALTITUDEMODE_ABSOLUTE 301 } AltitudeModeEnum; 302 303 typedef enum { 304 COLORMODE_NORMAL = 0, 305 COLORMODE_RANDOM 306 } ColorModeEnum; 307 308 typedef enum { 309 DISPLAYMODE_DEFAULT = 0, 310 DISPLAYMODE_HIDE 311 } DisplayModeEnum; 312 313 typedef enum { 314 GRIDORIGIN_LOWERLEFT = 0, 315 GRIDORIGIN_UPPERLEFT 316 } GridOriginEnum; 317 318 typedef enum { 319 ITEMICONSTATE_OPEN = 0, 320 ITEMICONSTATE_CLOSED, 321 ITEMICONSTATE_ERROR, 322 ITEMICONSTATE_FETCHING0, 323 ITEMICONSTATE_FETCHING1, 324 ITEMICONSTATE_FETCHING2 325 } ItemIconStateEnum; 326 327 typedef enum { 328 LISTITEMTYPE_CHECK = 0, 329 LISTITEMTYPE_RADIOFOLDER, 330 LISTITEMTYPE_CHECKOFFONLY, 331 LISTITEMTYPE_CHECKHIDECHILDREN 332 } ListItemTypeEnum; 333 334 typedef enum { 335 REFRESHMODE_ONCHANGE = 0, 336 REFRESHMODE_ONINTERVAL, 337 REFRESHMODE_ONEXPIRE 338 } RefreshModeEnum; 339 340 typedef enum { 341 SHAPE_RECTANGLE = 0, 342 SHAPE_CYLINDER, 343 SHAPE_SPHERE 344 } ShapeEnum; 345 346 typedef enum { 347 STYLESTATE_NORMAL = 0, 348 STYLESTATE_HIGHLIGHT 349 } StyleStateEnum; 350 351 typedef enum { 352 UNITS_FRACTION = 0, 353 UNITS_PIXELS, 354 UNITS_INSETPIXELS 355 } UnitsEnum; 356 357 typedef enum { 358 VIEWREFRESHMODE_NEVER = 0, 359 VIEWREFRESHMODE_ONREQUEST, 360 VIEWREFRESHMODE_ONSTOP, 361 VIEWREFRESHMODE_ONREGION 362 } ViewRefreshModeEnum; 363 364 typedef enum { 365 GX_ALTITUDEMODE_CLAMPTOSEAFLOOR = 0, 366 GX_ALTITUDEMODE_RELATIVETOSEAFLOOR 367 } GxAltitudeModeEnum; 368 369 typedef enum { 370 GX_FLYTOMODE_BOUNCE = 0, 371 GX_FLYTOMODE_SMOOTH 372 } GxFlyToModeEnum; 373 374 typedef enum { 375 GX_PLAYMODE_PAUSE = 0 376 } GxPlayModeEnum; 377 378 } // end namespace kmldom 379 380 #endif // KML_DOM_KML22_H__ 381