Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
alta
alta
Commits
d32f4d4b
Commit
d32f4d4b
authored
Feb 14, 2017
by
Ludovic Courtès
Browse files
core: 'arguments' supports an initializer list.
parent
2085e353
Changes
1
Hide whitespace changes
Inline
Side-by-side
sources/core/args.h
View file @
d32f4d4b
/* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions
Copyright (C) 2014, 2015 Universtie de Montreal
Copyright (C) 2013, 2014 Inria
Copyright (C) 2013, 2014
, 2017
Inria
This file is part of ALTA.
...
...
@@ -14,6 +14,7 @@
#include <string>
#include <sstream>
#include <map>
#include <initializer_list>
#include <cstdlib>
#include <iostream>
#include <cctype>
...
...
@@ -33,12 +34,20 @@ namespace alta {
*/
class
arguments
{
private:
typedef
std
::
pair
<
const
std
::
string
,
std
::
string
>
pair_type
;
public:
// functions
// Constructor and destructor
arguments
()
{
}
arguments
(
std
::
initializer_list
<
pair_type
>
lst
)
:
_map
(
lst
)
{
}
arguments
(
int
argc
,
char
**
const
argv
)
{
for
(
int
i
=
0
;
i
<
argc
;
++
i
)
...
...
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