]>
Commit | Line | Data |
---|---|---|
8e3e242c RC |
1 | /* |
2 | * Copyright (c) 2002 Robert Collins. | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify | |
5 | * it under the terms of the GNU General Public License as published by | |
6 | * the Free Software Foundation; either version 2 of the License, or | |
7 | * (at your option) any later version. | |
8 | * | |
9 | * A copy of the GNU General Public License can be found at | |
10 | * http://www.gnu.org/ | |
11 | * | |
12 | * Written by Robert Collins <robertc@hotmail.com> | |
13 | * | |
14 | */ | |
15 | ||
16 | #if HAVE_CONFIG_H | |
17 | #include "autoconf.h" | |
18 | #endif | |
7419f059 RC |
19 | #include "getopt++/GetOption.h" |
20 | #include "getopt++/Option.h" | |
8e3e242c RC |
21 | |
22 | GetOption | |
23 | GetOption::Instance; | |
24 | ||
25 | GetOption & GetOption::GetInstance () | |
26 | { | |
27 | if (Instance.inited != 42) | |
28 | { | |
29 | Instance.Init (); | |
30 | } | |
31 | return Instance; | |
32 | } | |
33 | ||
8e3e242c RC |
34 | void |
35 | GetOption::Init () | |
36 | { | |
8e3e242c | 37 | inited = 42; |
7419f059 | 38 | OptionSet::Init(); |
8e3e242c | 39 | } |