| 308 | |
| 309 | === Util Feature Reader === |
| 310 | |
| 311 | {{{ |
| 312 | /// \brief |
| 313 | /// A generic feature reader. The underlying feature reader and the ExpressionEngine |
| 314 | /// are used to get the value of a property, computed identifiers and expressions |
| 315 | /// |
| 316 | public __gc class UtilFeatureReader : public OSGEO_FDO_COMMANDS::FEATURE::IFeatureReader |
| 317 | { |
| 318 | public: |
| 319 | |
| 320 | /// \brief |
| 321 | /// Constructs an instance of a UtilFeatureReader |
| 322 | /// |
| 323 | UtilFeatureReader (OSGEO_FDO_SCHEMA::ClassDefinition* classDef, |
| 324 | OSGEO_FDO_COMMANDS::FEATURE::IFeatureReader* reader, |
| 325 | OSGEO_FDO_FILTER::Filter *filter, |
| 326 | OSGEO_FDO_COMMANDS::IdentifierCollection* selectedIds, |
| 327 | OSGEO_FDO_UTILITIES_EXPRESSIONENGINE::FunctionCollection *userDefinedFunctions); |
| 328 | |
| 329 | public: |
| 330 | /// \brief |
| 331 | /// Gets the Boolean value of the specified property. No conversion is |
| 332 | /// performed, thus the property must be Boolean or an |
| 333 | /// exception is thrown. |
| 334 | /// |
| 335 | /// \param propertyName |
| 336 | /// Input the property name. |
| 337 | /// |
| 338 | /// \return |
| 339 | /// Returns the Boolean value |
| 340 | /// |
| 341 | System::Boolean GetBoolean(System::String* propertyName); |
| 342 | |
| 343 | /// \brief |
| 344 | /// Gets the byte value of the specified property. No conversion is |
| 345 | /// performed, thus the property must be Byte or an |
| 346 | /// exception is thrown. |
| 347 | /// |
| 348 | /// \param propertyName |
| 349 | /// Input the property name. |
| 350 | /// |
| 351 | /// \return |
| 352 | /// Returns the byte value. |
| 353 | /// |
| 354 | System::Byte GetByte(System::String* propertyName); |
| 355 | |
| 356 | /// \brief |
| 357 | /// Gets the date time value of the specified property. No conversion |
| 358 | /// is performed, thus the property must be DateTime or |
| 359 | /// an exception is thrown. |
| 360 | /// |
| 361 | /// \param propertyName |
| 362 | /// Input the property name. |
| 363 | /// |
| 364 | /// \return |
| 365 | /// Returns the date and time value. |
| 366 | /// |
| 367 | OSGEO_FDO_SCHEMA::DateTime GetDateTime(System::String* propertyName); |
| 368 | |
| 369 | /// \brief |
| 370 | /// Gets the double-precision floating point value of the specified property. |
| 371 | /// No conversion is performed, thus the property must be of type |
| 372 | /// Double or an exception is thrown. |
| 373 | /// |
| 374 | /// \param propertyName |
| 375 | /// Input the property name. |
| 376 | /// |
| 377 | /// \return |
| 378 | /// Returns the double value. |
| 379 | /// |
| 380 | System::Double GetDouble(System::String* propertyName); |
| 381 | |
| 382 | /// \brief |
| 383 | /// Gets the signed 16-bit integer value of the specified property. No conversion is |
| 384 | /// performed, thus the property must be Int16 or an |
| 385 | /// exception is thrown. |
| 386 | /// |
| 387 | /// \param propertyName |
| 388 | /// Input the property name. |
| 389 | /// |
| 390 | /// \return |
| 391 | /// Returns the FdoInt16 value. |
| 392 | /// |
| 393 | System::Int16 GetInt16(System::String* propertyName); |
| 394 | |
| 395 | /// \brief |
| 396 | /// Gets the signed 32-bit integer value of the specified property. No conversion is |
| 397 | /// performed, thus the property must be Int32 or an |
| 398 | /// exception is thrown. |
| 399 | /// |
| 400 | /// \param propertyName |
| 401 | /// Input the property name. |
| 402 | /// |
| 403 | /// \return |
| 404 | /// Returns the System::Int32 value. |
| 405 | /// |
| 406 | System::Int32 GetInt32(System::String* propertyName); |
| 407 | |
| 408 | /// \brief |
| 409 | /// Gets the signed 64-bit integer value of the specified property. No conversion |
| 410 | /// is performed, thus the property must be Int64 or an |
| 411 | /// exception is thrown. |
| 412 | /// |
| 413 | /// \param propertyName |
| 414 | /// Input the property name. |
| 415 | /// |
| 416 | /// \return |
| 417 | /// Returns the FdoInt64 value. |
| 418 | /// |
| 419 | System::Int64 GetInt64(System::String* propertyName); |
| 420 | |
| 421 | /// \brief |
| 422 | /// Gets the single-precision floating point value of the specified property. |
| 423 | /// No conversion is performed, thus the property must be Double |
| 424 | /// or an exception is thrown. |
| 425 | /// |
| 426 | /// \param propertyName |
| 427 | /// Input the property name. |
| 428 | /// |
| 429 | /// \return |
| 430 | /// Returns the single value |
| 431 | /// |
| 432 | System::Double GetSingle(System::String* propertyName); |
| 433 | |
| 434 | /// \brief |
| 435 | /// Gets the string value of the specified property. No conversion is |
| 436 | /// performed, thus the property must be String or an |
| 437 | /// exception is thrown. |
| 438 | /// |
| 439 | /// \param propertyName |
| 440 | /// Input the property name. |
| 441 | /// |
| 442 | /// \return |
| 443 | /// Returns the string value. |
| 444 | /// |
| 445 | System::String* GetString(System::String* propertyName); |
| 446 | |
| 447 | /// \brief |
| 448 | /// Gets a LOBValue reference. The LOB is fully read in and data available. |
| 449 | /// Because no conversion is performed, the property must be BLOB or |
| 450 | /// CLOB etc. (a LOB type) |
| 451 | /// |
| 452 | /// \param propertyName |
| 453 | /// Input the property name. |
| 454 | /// |
| 455 | /// \return |
| 456 | /// Returns the reference to LOBValue |
| 457 | /// |
| 458 | OSGEO_FDO_EXPRESSION::LOBValue* GetLOB(System::String* propertyName); |
| 459 | |
| 460 | /// \brief |
| 461 | /// Gets a reference of the specified LOB property as a BLOBStreamReader or |
| 462 | /// CLOBStreamReader etc. to allow reading in blocks of data. |
| 463 | /// Because no conversion is performed, the property must be BLOB |
| 464 | /// or CLOB etc. (a LOB type) |
| 465 | /// Cast the IStreamReader to the appropiate LOB Stream Reader. |
| 466 | /// |
| 467 | /// \param propertyName |
| 468 | /// Input the property name. |
| 469 | /// |
| 470 | /// \return |
| 471 | /// Returns a reference to a LOB stream reader |
| 472 | /// |
| 473 | OSGEO_FDO_COMMON::IStreamReader* GetLOBStreamReader(System::String* propertyName ); |
| 474 | |
| 475 | /// \brief |
| 476 | /// Returns true if the value of the specified property is null. |
| 477 | /// |
| 478 | /// \param propertyName |
| 479 | /// Input the property name. |
| 480 | /// |
| 481 | /// \return |
| 482 | /// Returns true if the value is null. |
| 483 | /// |
| 484 | System::Boolean IsNull(System::String* propertyName); |
| 485 | |
| 486 | /// \brief |
| 487 | /// Gets the geometry value of the specified property as a byte array |
| 488 | /// in FGF format. No conversion is performed, thus the property |
| 489 | /// must be of Geometric type or an exception is thrown. |
| 490 | /// |
| 491 | /// \param propertyName |
| 492 | /// Input the property name. |
| 493 | /// |
| 494 | /// \return |
| 495 | /// Returns the FGF byte array value. |
| 496 | /// |
| 497 | System::ByteArray* GetGeometry(System::String* propertyName); |
| 498 | |
| 499 | /// \brief |
| 500 | /// Gets the raster object of the specified property. |
| 501 | /// Because no conversion is performed, the property must be |
| 502 | /// of Raster type; otherwise, an exception is thrown. |
| 503 | /// |
| 504 | /// \param propertyName |
| 505 | /// Input the property name. |
| 506 | /// |
| 507 | /// \return |
| 508 | /// Returns the raster object. |
| 509 | /// |
| 510 | OSGEO_FDO_RASTER::IRaster* GetRaster(System::String* propertyName); |
| 511 | |
| 512 | /// \brief |
| 513 | /// Advances the reader to the next item. The default position of the |
| 514 | /// reader is prior to the first item. Thus, you must call ReadNext |
| 515 | /// to begin accessing any data. |
| 516 | /// |
| 517 | /// \return |
| 518 | /// Returns true if there is a next item. |
| 519 | /// |
| 520 | System::Boolean ReadNext(); |
| 521 | |
| 522 | /// \brief |
| 523 | /// Closes the IDataReader object, freeing any resources it may be holding. |
| 524 | /// |
| 525 | /// \return |
| 526 | /// Returns nothing |
| 527 | /// |
| 528 | System::Void Close(); |
| 529 | |
| 530 | /// \brief |
| 531 | /// Gets the definition of the object currently being read. If the user |
| 532 | /// has requested only a subset of the class properties, the class |
| 533 | /// definition reflects what the user has asked, rather than the full class |
| 534 | /// definition. |
| 535 | /// |
| 536 | /// \return |
| 537 | /// Returns the class definition object. |
| 538 | /// |
| 539 | OSGEO_FDO_SCHEMA::ClassDefinition* GetClassDefinition(); |
| 540 | |
| 541 | /// \brief |
| 542 | /// Gets a value indicating the depth of nesting for the current reader. |
| 543 | /// The depth value increases each time GetFeatureObject is called and a new |
| 544 | /// reader is returned. The outermost reader has a depth of 0. |
| 545 | /// |
| 546 | /// \return |
| 547 | /// Returns the depth |
| 548 | /// |
| 549 | System::Int32 GetDepth(); |
| 550 | |
| 551 | /// \brief |
| 552 | /// Gets the geometry value of the specified property as a byte array in |
| 553 | /// FGF format. Because no conversion is performed, the property must be |
| 554 | /// of Geometric type; otherwise, an exception is thrown. |
| 555 | /// This method is a language-specific performance optimization that returns a |
| 556 | /// pointer to the array data, rather than to an object that encapsulates |
| 557 | /// the array. The array's memory area is only guaranteed to be valid |
| 558 | /// until a call to ReadNext() or Close(), or the disposal of this reader |
| 559 | /// object. |
| 560 | /// |
| 561 | /// \param propertyName |
| 562 | /// Input the property name. |
| 563 | /// |
| 564 | /// \param count |
| 565 | /// Output the number of bytes in the array. |
| 566 | /// |
| 567 | /// \return |
| 568 | /// Returns a pointer to the byte array in FGF format. |
| 569 | /// |
| 570 | const System::Byte * GetGeometry(System::String* propertyName, System::Int32 * count); |
| 571 | |
| 572 | |
| 573 | /// \brief |
| 574 | /// Gets a reference to an IFeatureReader to read the data contained in |
| 575 | /// the object or object collection property. If the property is not an |
| 576 | /// object property, an exception is thrown. |
| 577 | /// |
| 578 | /// \param propertyName |
| 579 | /// Input the property name. |
| 580 | /// |
| 581 | /// \return |
| 582 | /// Returns the nested feature reader |
| 583 | /// |
| 584 | OSGEO_FDO_COMMANDS_FEATURE::IFeatureReader* GetFeatureObject(System::String* propertyName); |
| 585 | }; |
| 586 | |
| 587 | }}} |