Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
28b176f2
Commit
28b176f2
authored
Jul 17, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove obsolete file
parent
465cbea1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
120 deletions
+0
-120
cppa/cppa.hpp
cppa/cppa.hpp
+0
-1
cppa/options_description.hpp
cppa/options_description.hpp
+0
-119
No files found.
cppa/cppa.hpp
View file @
28b176f2
...
@@ -28,7 +28,6 @@
...
@@ -28,7 +28,6 @@
#include "cppa/opt.hpp"
#include "cppa/opt.hpp"
#include "cppa/cow_tuple.hpp"
#include "cppa/cow_tuple.hpp"
#include "cppa/remote_actor.hpp"
#include "cppa/remote_actor.hpp"
#include "cppa/options_description.hpp"
#include "cppa/publish_local_groups.hpp"
#include "cppa/publish_local_groups.hpp"
// set old namespace to new namespace
// set old namespace to new namespace
...
...
cppa/options_description.hpp
deleted
100644 → 0
View file @
465cbea1
/******************************************************************************\
* ___ __ *
* /\_ \ __/\ \ *
* \//\ \ /\_\ \ \____ ___ _____ _____ __ *
* \ \ \ \/\ \ \ '__`\ /'___\/\ '__`\/\ '__`\ /'__`\ *
* \_\ \_\ \ \ \ \L\ \/\ \__/\ \ \L\ \ \ \L\ \/\ \L\.\_ *
* /\____\\ \_\ \_,__/\ \____\\ \ ,__/\ \ ,__/\ \__/.\_\ *
* \/____/ \/_/\/___/ \/____/ \ \ \/ \ \ \/ \/__/\/_/ *
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011 - 2014 *
* Dominik Charousset <dominik.charousset (at) haw-hamburg.de> *
* *
* Distributed under the Boost Software License, Version 1.0. See *
* accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt *
\******************************************************************************/
#ifndef CPPA_OPTIONS_DESCRIPTION_HPP
#define CPPA_OPTIONS_DESCRIPTION_HPP
#include <map>
#include <string>
#include <vector>
#include <iostream>
#include <functional>
#include "caf/on.hpp"
#include "caf/optional.hpp"
#include "caf/detail/demangle.hpp"
#include "cppa/opt_impls.hpp"
namespace
caf
{
/**
* @brief Right-hand side of a match expression for a program option
* reading an argument of type @p T.
*/
template
<
typename
T
>
detail
::
rd_arg_functor
<
T
>
rd_arg
(
T
&
storage
)
{
return
{
storage
};
}
/**
* @brief Right-hand side of a match expression for a program option
* adding an argument of type @p T to @p storage.
*/
template
<
typename
T
>
detail
::
add_arg_functor
<
T
>
add_arg
(
std
::
vector
<
T
>&
storage
)
{
return
{
storage
};
}
inline
std
::
function
<
void
()
>
set_flag
(
bool
&
storage
)
{
return
[
&
]
{
storage
=
true
;
};
}
/**
* @brief Stores a help text along with the number of expected arguments.
*/
struct
option_info
{
std
::
string
help_text
;
size_t
num_args
;
};
/**
* @brief Stores a help text for program options with option groups.
*/
using
options_description
=
std
::
map
<
std
::
string
,
std
::
map
<
std
::
pair
<
char
,
std
::
string
>
,
option_info
>
>
;
using
opt_rvalue_builder
=
decltype
(
on
(
std
::
function
<
optional
<
std
::
string
>
(
const
std
::
string
&
)
>
{})
||
on
(
std
::
string
{},
val
<
std
::
string
>
));
using
opt0_rvalue_builder
=
decltype
(
on
(
std
::
string
{})
||
on
(
std
::
string
{}));
/**
* @brief Left-hand side of a match expression for a program option with
* one argument.
*/
opt_rvalue_builder
on_opt1
(
char
short_opt
,
std
::
string
long_opt
,
options_description
*
desc
=
nullptr
,
std
::
string
help_text
=
""
,
std
::
string
help_group
=
"general options"
);
/**
* @brief Left-hand side of a match expression for a program option with
* no argument.
*/
opt0_rvalue_builder
on_opt0
(
char
short_opt
,
std
::
string
long_opt
,
options_description
*
desc
=
nullptr
,
std
::
string
help_text
=
""
,
std
::
string
help_group
=
"general options"
);
/**
* @brief Returns a function that prints the help text of @p desc to @p out.
*/
std
::
function
<
void
()
>
print_desc
(
options_description
*
desc
,
std
::
ostream
&
out
=
std
::
cout
);
/**
* @brief Returns a function that prints the help text of @p desc to @p out
* and then calls <tt>exit(exit_reason)</tt>.
*/
std
::
function
<
void
()
>
print_desc_and_exit
(
options_description
*
desc
,
std
::
ostream
&
out
=
std
::
cout
,
int
exit_reason
=
0
);
}
// namespace caf
#endif // CPPA_OPTIONS_DESCRIPTION_HPP
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment