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

Boost Graph Library: EventVisitor

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

EventVisitor Concept

This concept defines the interface for single-event visitors. An EventVisitor has an apply member function (operator()) which is invoked within the graph algorithm at the event-point specified by the event_filter typedef within the EventVisitor. EventVisitor's can be combined into an EventVistorList.

The following is the list of event tags that can be invoked in BGL algorithms. Each tag corresponds to a member function of the visitor for an algorithm. For example, the BFSVisitor of breadth_first_search() has a cycle_edge() member function. The corresponding tag is on_cycle_edge. The first argument is the event visitor's operator() must be either an edge or vertex descriptor depending on the event tag.

namespace boost {
  struct on_initialize_vertex { };
  struct on_start_vertex { };
  struct on_discover_vertex { };
  struct on_examine_edge { };
  struct on_tree_edge { };
  struct on_cycle_edge { };
  struct on_finish_vertex { };
  struct on_forward_or_cross_edge { };
  struct on_back_edge { };
  struct on_edge_relaxed { };
  struct on_edge_not_relaxed { };
  struct on_edge_minimized { };
  struct on_edge_not_minimized { };
} // namespace boost

Refinement of

Copy Constructible (copying a visitor should be a lightweight operation).

Notation

G Тип, который является модельюГрафа.
г Объект типаG.
В Тип, который является моделью EventVisitor.
против Объект типаV.
x Объект типаboost::graph_traits::vertex_descriptorилиboost::graph_traits::edge_descriptor.

Associated Types

Фильтр событий V::event_filter Структура тега, чтобы указать, на какое событие посетитель должен быть вызван.

Valid Expressions

NameExpressionReturn TypeDescription
Apply Посетитель vis(x, g) пустота Взывает к операции посетителя на объектеx, который является либо вершиной, либо краевым дескриптором графика.

Models

See Also

EventVisitorList, Visitor concepts

Copyright © 2000-2001Джереми Сик, Университет Индианыjsiek@osl.iu.edu]
Ли-Куан Ли, Университет Индианыllee@cs.indiana.edu]
Эндрю Лумсдейн, Университет Индианыlums@osl.iu.edu

Статья Boost Graph Library: EventVisitor раздела может быть полезна для разработчиков на c++ и boost.




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



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


реклама


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

Время компиляции файла: 2024-08-30 11:47:00
2025-05-20 07:10:44/0.0073649883270264/1