FdManager.cci
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
14 /** \file
15  \brief FdManager inline non-template implementation */
16 
17 //#include "FdManager.ih"
18 
19 // Custom includes
20 
21 #define prefix_ inline
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
23 
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 // senf::scheduler::FdManager
26 
27 prefix_ senf::scheduler::detail::FdManager::FdManager()
28  : eventTime_ (senf::ClockService::now())
29 {
30  eventTimestamp_.update(eventTime_);
31 }
32 
33 prefix_ bool senf::scheduler::detail::FdManager::set(int fd, int events, Event * entry)
34 {
35  return poller_.set(fd, events, entry);
36 }
37 
38 prefix_ void senf::scheduler::detail::FdManager::remove(int fd)
39 {
40  poller_.remove(fd);
41 }
42 
43 prefix_ void senf::scheduler::detail::FdManager::timeout(int t)
44 {
45  poller_.timeout(t);
46 }
47 
48 prefix_ int senf::scheduler::detail::FdManager::timeout()
49  const
50 {
51  return poller_.timeout();
52 }
53 
54 prefix_ senf::ClockService::clock_type const & senf::scheduler::detail::FdManager::eventTime()
55  const
56 {
57  return eventTime_;
58 }
59 
60 prefix_ senf::CyclicTimestamp const & senf::scheduler::detail::FdManager::eventTimestamp()
61  const
62 {
63  return eventTimestamp_;
64 }
65 
66 
67 //-/////////////////////////////////////////////////////////////////////////////////////////////////
68 // senf::scheduler::detail::FdManager::Event
69 
70 prefix_ senf::scheduler::detail::FdManager::Event::~Event()
71 {}
72 
73 //-/////////////////////////////////////////////////////////////////////////////////////////////////
74 #undef prefix_
75 
76 
77 // Local Variables:
78 // mode: c++
79 // fill-column: 100
80 // comment-column: 40
81 // c-file-style: "senf"
82 // indent-tabs-mode: nil
83 // ispell-local-dictionary: "american"
84 // compile-command: "scons -u test"
85 // End: