Home | History | Annotate | Download | only in asio

Lines Matching refs:Service

33 template <typename Service> Service& use_service(io_service& ios);
34 template <typename Service> void add_service(io_service& ios, Service* svc);
35 template <typename Service> bool has_service(io_service& ios);
139 * services, indexed by service type. An object of class io_service must be
153 * In a call to @c use_service<Service>(), the type argument chooses a service,
154 * making available all members of the named type. If @c Service is not present
155 * in an io_service, an object of type @c Service is created and added to the
157 * particular service with the function template @c has_service<Service>().
159 * Service objects may be explicitly added to an io_service using the function
160 * template @c add_service<Service>(). If the @c Service is already present, the
161 * service_already_exists exception is thrown. If the owner of the service is
165 * Once a service reference is obtained from an io_service object by calling
169 * All I/O service implementations have io_service::service as a public base
185 class service;
206 * @li For each service object @c svc in the io_service set, in reverse order
207 * of the beginning of service object lifetime, performs
213 * @li For each service object @c svc in the io_service set, in reverse order
214 * of the beginning of service object lifetime, performs
215 * <tt>delete static_cast<io_service::service*>(svc)</tt>.
529 * @note For each service object @c svc in the io_service set, performs
531 * services are visited in reverse order of the beginning of service object
533 * service object lifetime.
537 /// Obtain the service object corresponding to the given type.
539 * This function is used to locate a service object that corresponds to
540 * the given service type. If there is no existing implementation of the
541 * service, then the io_service will create a new instance of the service.
543 * @param ios The io_service object that owns the service.
545 * @return The service interface implementing the specified service type.
546 * Ownership of the service interface is not transferred to the caller.
548 template <typename Service>
549 friend Service& use_service(io_service& ios);
551 /// Add a service object to the io_service.
553 * This function is used to add a service to the io_service.
555 * @param ios The io_service object that owns the service.
557 * @param svc The service object. On success, ownership of the service object
559 * it will destroy the service object by performing:
560 * @code delete static_cast<io_service::service*>(svc) @endcode
562 * @throws asio::service_already_exists Thrown if a service of the
565 * @throws asio::invalid_service_owner Thrown if the service's owning
568 template <typename Service>
569 friend void add_service(io_service& ios, Service* svc);
571 /// Determine if an io_service contains a specified service type.
574 * service object corresponding to the given service type.
576 * @param ios The io_service object that owns the service.
578 * @return A boolean indicating whether the io_service contains the service.
580 template <typename Service>
588 // The service registry.
643 /// Class used to uniquely identify a service.
653 class io_service::service
657 /// Get the io_service object that owns the service.
663 * @param owner The io_service object that owns the service.
665 ASIO_DECL service(asio::io_service& owner);
668 ASIO_DECL virtual ~service();
671 /// Destroy all user-defined handler objects owned by the service.
692 service* next_;
695 /// Exception thrown when trying to add a duplicate service to an io_service.
703 /// Exception thrown when trying to add a service object to an io_service where
704 /// the service has a different owner.
714 // Special derived service id type to keep classes header-file only.
721 // Special service base class to keep classes header-file only.
724 : public asio::io_service::service
731 : asio::io_service::service(io_service)