| 494 | |
| 495 | /** \brief Wrapper of a std::map<std::string, BaseObjectNNPtr> */ |
| 496 | class PropertyMap { |
| 497 | public: |
| 498 | PROJ_DLL PropertyMap(); |
| 499 | //! @cond Doxygen_Suppress |
| 500 | PROJ_DLL PropertyMap(const PropertyMap &other); |
| 501 | PROJ_DLL ~PropertyMap(); |
| 502 | //! @endcond |
| 503 | |
| 504 | PROJ_DLL PropertyMap &set(const std::string &key, |
| 505 | const BaseObjectNNPtr &val); |
| 506 | |
| 507 | //! @cond Doxygen_Suppress |
| 508 | template <class T> |
| 509 | inline PropertyMap &set(const std::string &key, |
| 510 | const nn_shared_ptr<T> &val) { |
| 511 | return set( |
| 512 | key, BaseObjectNNPtr(i_promise_i_checked_for_null, |
| 513 | BaseObjectPtr(val.as_nullable(), val.get()))); |
| 514 | } |
| 515 | //! @endcond |
| 516 | |
| 517 | // needed to avoid the bool constructor to be taken ! |
| 518 | PROJ_DLL PropertyMap &set(const std::string &key, const char *val); |
| 519 | |
| 520 | PROJ_DLL PropertyMap &set(const std::string &key, const std::string &val); |
| 521 | |
| 522 | PROJ_DLL PropertyMap &set(const std::string &key, int val); |
| 523 | |
| 524 | PROJ_DLL PropertyMap &set(const std::string &key, bool val); |
| 525 | |
| 526 | PROJ_DLL PropertyMap &set(const std::string &key, |
| 527 | const std::vector<std::string> &array); |
| 528 | |
| 529 | PROJ_PRIVATE : |
| 530 | //! @cond Doxygen_Suppress |
| 531 | const BaseObjectNNPtr * |
| 532 | get(const std::string &key) const; |
| 533 | |
| 534 | // throw(InvalidValueTypeException) |
| 535 | bool getStringValue(const std::string &key, std::string &outVal) const; |
| 536 | bool getStringValue(const std::string &key, |
| 537 | optional<std::string> &outVal) const; |
| 538 | void unset(const std::string &key); |
| 539 | |
| 540 | static PropertyMap createAndSetName(const char *name); |
| 541 | static PropertyMap createAndSetName(const std::string &name); |
| 542 | //! @endcond |
| 543 | |
| 544 | private: |
| 545 | PropertyMap &operator=(const PropertyMap &) = delete; |
| 546 | |
| 547 | PROJ_OPAQUE_PRIVATE_DATA |
| 548 | }; |
| 549 | |
| 550 | // --------------------------------------------------------------------------- |
| 551 | |
| 552 | class LocalName; |
| 553 | /** Shared pointer of LocalName. */ |