1//
2// impl/serial_port_base.hpp
3// ~~~~~~~~~~~~~~~~~~~~~~~~~
4//
5// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
7//
8// Distributed under the Boost Software License, Version 1.0. (See accompanying
9// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
10//
11
12#ifndef BOOST_ASIO_IMPL_SERIAL_PORT_BASE_HPP
13#define BOOST_ASIO_IMPL_SERIAL_PORT_BASE_HPP
14
15#if defined(_MSC_VER) && (_MSC_VER >= 1200)
16# pragma once
17#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18
19#include <boost/asio/detail/push_options.hpp>
20
21namespace boost {
22namespace asio {
23
24inline serial_port_base::baud_rate::baud_rate(unsigned int rate)
25 : value_(rate)
26{
27}
28
29inline unsigned int serial_port_base::baud_rate::value() const
30{
31 return value_;
32}
33
34inline serial_port_base::flow_control::type
35serial_port_base::flow_control::value() const
36{
37 return value_;
38}
39
40inline serial_port_base::parity::type serial_port_base::parity::value() const
41{
42 return value_;
43}
44
45inline serial_port_base::stop_bits::type
46serial_port_base::stop_bits::value() const
47{
48 return value_;
49}
50
51inline unsigned int serial_port_base::character_size::value() const
52{
53 return value_;
54}
55
56} // namespace asio
57} // namespace boost
58
59#include <boost/asio/detail/pop_options.hpp>
60
61#endif // BOOST_ASIO_IMPL_SERIAL_PORT_BASE_HPP
62

source code of boost/boost/asio/impl/serial_port_base.hpp