OpFlex Framework 1.7.0
MainLoopAdaptor.h
Go to the documentation of this file.
1/* -*- C++ -*-; c-basic-offset: 4; indent-tabs-mode: nil */
6/*
7 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
8 *
9 * This program and the accompanying materials are made available under the
10 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
11 * and is available at http://www.eclipse.org/legal/epl-v10.html
12 */
13
14#pragma once
15#ifndef OPFLEX_CORE_MAINLOOPADAPTOR_H
16#define OPFLEX_CORE_MAINLOOPADAPTOR_H
17
18namespace opflex {
19namespace ofcore {
20
25
32public:
38 virtual void runOnce() = 0;
39
46 virtual int getBackendFd() = 0;
47
54 virtual int getBackendTimeout() = 0;
55};
56
58
59} /* namespace ofcore */
60} /* namespace opflex */
61
62#endif /* OPFLEX_CORE_MAINLOOPADAPTOR_H */
An adaptor that allows integrating libopflex with an external main loop.
Definition MainLoopAdaptor.h:31
virtual int getBackendFd()=0
Get the backend file descriptor.
virtual void runOnce()=0
Run one iteration of the main loop, and return when complete.
virtual int getBackendTimeout()=0
Get the poll timeout for the backend file descriptor.