Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Readable Property Map

Boost , ,

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

C++ Boost

Readable Property Map

A Readable Property Map provides read-access to the value associated with a given key via a call to the get() function. The return type of the get()function is either the value_type of the property map or a (const or non-const) reference to that type.

Refinement of

Copy Constructible

Notation

PMap Тип, который является моделью карты читаемой собственности.
pmap Объект типа PMap.
key Объект типа boost::property_traits< PMap>::key_type.

Associated Types

Тип значения boost::property_traits::value_type Тип собственности.
Тип ссылки boost::property_traits::reference Тип, который конвертируется в тип стоимости.
Тип ключа boost::property_traits::key_type Тип ключевого объекта, используемого для поиска недвижимости. Карта свойств может быть составлена по типу ключа, и в этом случае этот типдеф может быть void.
Категория карты недвижимости boost::property_traits::категория Категория свойства: тип, конвертируемый в readable_property_map_tag.

Valid Expressions

NameExpressionReturn TypeDescription
Получить стоимость недвижимости get(pmap, key) ссылка Выберите значение, связанное с key.

Concept Checking Class

  template <class PMap, class Key>
  struct ReadablePropertyMapConcept
  {
    typedef typename property_traits<PMap>::key_type key_type;
    typedef typename property_traits<PMap>::category Category;
    typedef boost::readable_property_map_tag ReadableTag;
    void constraints() {
      function_requires< ConvertibleConcept<Category, ReadableTag> >();
      val = get(pmap, k);
    }
    PMap pmap;
    Key k;
    typename property_traits<PMap>::value_type val;
  };

See Also

Property map concepts

Design Notes

At various times the name "read-only" was considered for this concept. However, that name is inappropriate because concepts are inherently positive, not negative. This becomes obvious when we define the Read Write Property Map, which refines both the Readable Property Map and the Writable Property Map concept. It would not make much sense to combine "read-only" and "write-only" concepts!

Copyright © 2000 Джереми Сик, Univ.of Notre Dame (jsiek@lsc.nd.edu)

Статья Readable Property Map раздела может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-05-19 19:32:50/0.027633905410767/1