Skip to content

Commit

Permalink
Rename SimpleScheduler to LoopScheduler. Get rid of useless PollingSc…
Browse files Browse the repository at this point in the history
…heduler
  • Loading branch information
daniele77 committed Jan 12, 2021
1 parent be2c88d commit 8ee0b9c
Show file tree
Hide file tree
Showing 57 changed files with 84 additions and 172 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
# CLI - A simple command line interface.
# Copyright (C) 2016-2020 Daniele Pallastrelli
# Copyright (C) 2016-2021 Daniele Pallastrelli
#
# Boost Software License - Version 1.0 - August 17th, 2003
#
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ A cross-platform header only C++14 library for interactive command line interfac

## Dependencies

The library depends on boost asio (to provide telnet server)
The library depends on asio (either the standalone version or the boost version)
only to provide telnet server.
Therefore, the library has no dependencies if you don't need remote sessions.

## Installation

Expand All @@ -38,7 +40,7 @@ library binaries or special treatment when linking.

Extract the archive wherever you want.

Now you must only remember to specify the cli and boost paths when
Now you must only remember to specify the cli (and optionally asio or boost) paths when
compiling your source code.

If you fancy it, a Cmake script is provided. To install you can use:
Expand All @@ -57,7 +59,8 @@ and, if you want to specify the installation path:

You can find some examples in the directory "examples".
Each .cpp file corresponds to an executable. You can compile each example by including
cli and boost header files and linking boost system (and pthread on linux).
cli (and optionally asio/boost header files)
and linking pthread on linux (and optionally boost system).

To compile the examples using cmake, use:

Expand Down
2 changes: 1 addition & 1 deletion doc/doxy/Doxyfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
# CLI - A simple command line interface.
# Copyright (C) 2016-2020 Daniele Pallastrelli
# Copyright (C) 2016-2021 Daniele Pallastrelli
#
# Boost Software License - Version 1.0 - August 17th, 2003
#
Expand Down
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
# CLI - A simple command line interface.
# Copyright (C) 2016-2020 Daniele Pallastrelli
# Copyright (C) 2016-2021 Daniele Pallastrelli
#
# Boost Software License - Version 1.0 - August 17th, 2003
#
Expand Down
2 changes: 1 addition & 1 deletion examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
# CLI - A simple command line interface.
# Copyright (C) 2016-2020 Daniele Pallastrelli
# Copyright (C) 2016-2021 Daniele Pallastrelli
#
# Boost Software License - Version 1.0 - August 17th, 2003
#
Expand Down
2 changes: 1 addition & 1 deletion examples/asyncsession.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion examples/complete.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion examples/filesession.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion examples/makefile.win
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
# CLI - A simple command line interface.
# Copyright (C) 2016-2020 Daniele Pallastrelli
# Copyright (C) 2016-2021 Daniele Pallastrelli
#
# Boost Software License - Version 1.0 - August 17th, 2003
#
Expand Down
11 changes: 4 additions & 7 deletions examples/pluginmanager.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand All @@ -27,12 +27,9 @@
* DEALINGS IN THE SOFTWARE.
******************************************************************************/

#ifdef CLI_EXAMPLES_USE_SIMPLE_SCHEDULER
#include <cli/simplescheduler.h>
using MainScheduler = cli::SimpleScheduler;
#elif defined(CLI_EXAMPLES_USE_POLLING_SCHEDULER)
#include <cli/pollingscheduler.h>
using MainScheduler = cli::PollingScheduler;
#ifdef CLI_EXAMPLES_USE_LOOP_SCHEDULER
#include <cli/loopscheduler.h>
using MainScheduler = cli::LoopScheduler;
#elif defined(CLI_EXAMPLES_USE_STANDALONEASIO_SCHEDULER)
#include <cli/standaloneasioscheduler.h>
using MainScheduler = cli::StandaloneAsioScheduler;
Expand Down
2 changes: 1 addition & 1 deletion examples/simplelocalsession.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/boostasiocliasyncsession.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/boostasioremotecli.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/boostasioscheduler.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/cli.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/clifilesession.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/clilocalsession.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/colorprofile.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/boostasiolib.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/commonprefix.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/fromstring.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/genericasioremotecli.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/genericasioscheduler.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/genericcliasyncsession.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/history.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/inputdevice.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/inputhandler.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/keyboard.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/linuxkeyboard.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/newboostasiolib.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/oldboostasiolib.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/server.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/split.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/standaloneasiolib.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/terminal.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/detail/winkeyboard.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/filehistorystorage.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
2 changes: 1 addition & 1 deletion include/cli/historystorage.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* CLI - A simple command line interface.
* Copyright (C) 2016-2020 Daniele Pallastrelli
* Copyright (C) 2016-2021 Daniele Pallastrelli
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
Expand Down
Loading

0 comments on commit 8ee0b9c

Please sign in to comment.