Skip to content

Commit 7fca882

Browse files
committed
documentation fixes
1 parent b2f36e3 commit 7fca882

File tree

9 files changed

+47
-52
lines changed

9 files changed

+47
-52
lines changed

docs/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ EXPAND_ONLY_PREDEF = NO
345345
SEARCH_INCLUDES = NO
346346
INCLUDE_PATH =
347347
INCLUDE_FILE_PATTERNS =
348-
PREDEFINED = TOML_DOXYGEN=1 \
348+
PREDEFINED = DOXYGEN=1 \
349349
__cplusplus=201703L \
350350
TOML_ALWAYS_INLINE=inline \
351351
TOML_MAY_THROW= \

docs/tomlplusplus.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,9 @@ pre.m-code + pre.m-console span
192192
{
193193
margin-right: 0.5rem;
194194
}
195+
196+
/* page category subheading ("module" etc) */
197+
h1 span.m-thin
198+
{
199+
color: #747474;
200+
}

include/toml++/toml.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
#undef TOML_STRING_PREFIX_1
6565
#undef TOML_STRING_PREFIX
6666
#undef TOML_UNDEF_MACROS
67-
#undef TOML_DOXYGEN
6867
#undef TOML_RELOPS_REORDERING
6968
#undef TOML_ASYMMETRICAL_EQUALITY_OPS
7069
#undef TOML_NS1_EX

include/toml++/toml_common.h

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@
8282
#endif
8383
#ifdef __EXCEPTIONS
8484
#define TOML_COMPILER_EXCEPTIONS 1
85+
#else
86+
#define TOML_COMPILER_EXCEPTIONS 0
8587
#endif
8688

8789
//floating-point from_chars and to_chars are not implemented in any version of clang as of 1/1/2020
@@ -107,6 +109,8 @@
107109
#endif
108110
#ifdef _CPPUNWIND
109111
#define TOML_COMPILER_EXCEPTIONS 1
112+
#else
113+
#define TOML_COMPILER_EXCEPTIONS 0
110114
#endif
111115

112116
#elif defined(__GNUC__)
@@ -129,6 +133,8 @@
129133
#endif
130134
#ifdef __cpp_exceptions
131135
#define TOML_COMPILER_EXCEPTIONS 1
136+
#else
137+
#define TOML_COMPILER_EXCEPTIONS 0
132138
#endif
133139

134140
// these pass the __has_attribute() test but cause warnings on if/else branches =/
@@ -159,7 +165,7 @@
159165
#define TOML_CPP 17
160166
#endif
161167
#ifndef TOML_COMPILER_EXCEPTIONS
162-
#define TOML_COMPILER_EXCEPTIONS 0
168+
#define TOML_COMPILER_EXCEPTIONS 1
163169
#endif
164170
#if TOML_COMPILER_EXCEPTIONS
165171
#ifndef TOML_EXCEPTIONS
@@ -181,9 +187,6 @@
181187
#define TOML_MAY_THROW_UNLESS(...) noexcept
182188
#define TOML_NS1_EX _noex
183189
#endif
184-
#ifndef TOML_DOXYGEN
185-
#define TOML_DOXYGEN 0
186-
#endif
187190
#ifndef TOML_DISABLE_INIT_WARNINGS
188191
#define TOML_DISABLE_INIT_WARNINGS
189192
#endif
@@ -300,7 +303,7 @@
300303
#define TOML_NS4
301304
#define TOML_NS5
302305

303-
#if !TOML_DOXYGEN
306+
#ifndef DOXYGEN
304307

305308
#define TOML_START_2(VER, ARG1, ARG2, ARG3, ARG4, ARG5) \
306309
namespace toml { inline namespace v##VER##ARG1##ARG2##ARG3##ARG4##ARG5
@@ -415,11 +418,14 @@ TOML_START
415418

416419
#endif
417420

421+
#ifndef DOXYGEN
422+
423+
// foward declarations are hidden from doxygen
424+
// because they fuck it up =/
418425
struct date;
419426
struct time;
420427
struct time_offset;
421428
struct date_time;
422-
423429
class node;
424430
class array;
425431
class table;
@@ -428,6 +434,8 @@ TOML_START
428434
template <typename> class default_formatter;
429435
template <typename> class json_formatter;
430436

437+
#endif // !DOXYGEN
438+
431439
/// \brief TOML node type identifiers.
432440
enum class node_type : uint8_t
433441
{
@@ -638,7 +646,7 @@ TOML_START
638646
TOML_PUSH_WARNINGS
639647
TOML_DISABLE_INIT_WARNINGS
640648

641-
#if TOML_DOXYGEN || !TOML_EXCEPTIONS
649+
#if defined(DOXYGEN) || !TOML_EXCEPTIONS
642650

643651
/// \brief An error thrown/returned when parsing fails.
644652
///

include/toml++/toml_parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
TOML_START
1010
{
11-
#if TOML_DOXYGEN || !TOML_EXCEPTIONS
11+
#if defined(DOXYGEN) || !TOML_EXCEPTIONS
1212

1313
/// \brief The result of a parsing operation.
1414
///

include/toml++/toml_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#pragma once
66

77
#define TOML_LIB_MAJOR 0
8-
#define TOML_LIB_MINOR 5
9-
#define TOML_LIB_PATCH 2
8+
#define TOML_LIB_MINOR 6
9+
#define TOML_LIB_PATCH 0
1010

1111
#define TOML_LANG_MAJOR 0
1212
#define TOML_LANG_MINOR 5

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project(
22
'tomlplusplus',
33
'cpp',
4-
version : '0.5.2',
4+
version : '0.6.0',
55
license : 'MIT',
66
default_options : [
77
'cpp_std=c++17',

python/generate_documentation.py

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
'exception',
4242
'iterator',
4343
'const_iterator',
44+
'void',
4445
'int',
4546
'long',
4647
'short',
@@ -883,35 +884,8 @@ def run_python_script(script_path, *args):
883884

884885

885886
def preprocess_xml(xml_dir):
887+
pass
886888

887-
# fix value not knowing it's a child of node
888-
toml_value_path = path.join(xml_dir, 'classtoml_1_1value.xml')
889-
toml_value_text = read_all_text_from_file(toml_value_path)
890-
toml_value_search_string = '<compoundname>toml::value</compoundname>'
891-
toml_value_insert_pos = toml_value_text.find(toml_value_search_string)
892-
changed = False
893-
if (toml_value_insert_pos != -1):
894-
toml_value_insert_pos += len(toml_value_search_string)
895-
toml_value_text = toml_value_text[:toml_value_insert_pos] \
896-
+ '\n <basecompoundref refid="classtoml_1_1node" prot="public" virt="non-virtual">toml::node</basecompoundref>' \
897-
+ toml_value_text[toml_value_insert_pos:]
898-
changed = True
899-
if changed:
900-
with open(toml_value_path,'w', encoding='utf-8', newline='\n') as output_file:
901-
print(toml_value_text, file=output_file)
902-
903-
# fix node not knowing it has value as a child
904-
toml_node_path = path.join(xml_dir, 'classtoml_1_1node.xml')
905-
toml_node_text = read_all_text_from_file(toml_node_path)
906-
toml_node_search_string = '<compoundname>toml::node</compoundname>'
907-
toml_node_insert_pos = toml_node_text.find(toml_node_search_string)
908-
if (toml_node_insert_pos != -1):
909-
toml_node_insert_pos += len(toml_node_search_string)
910-
toml_node_text = toml_node_text[:toml_node_insert_pos] \
911-
+ '\n <derivedcompoundref refid="classtoml_1_1value" prot="public" virt="non-virtual">toml::value</derivedcompoundref>' \
912-
+ toml_node_text[toml_node_insert_pos:]
913-
with open(toml_node_path,'w', encoding='utf-8', newline='\n') as output_file:
914-
print(toml_node_text, file=output_file)
915889

916890

917891
def main():

toml.hpp

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//----------------------------------------------------------------------------------------------------------------------
22
//
3-
// toml++ v0.5.2
3+
// toml++ v0.6.0
44
// https://github.com/marzer/tomlplusplus
55
// SPDX-License-Identifier: MIT
66
//
@@ -123,6 +123,8 @@
123123
#endif
124124
#ifdef __EXCEPTIONS
125125
#define TOML_COMPILER_EXCEPTIONS 1
126+
#else
127+
#define TOML_COMPILER_EXCEPTIONS 0
126128
#endif
127129

128130
//floating-point from_chars and to_chars are not implemented in any version of clang as of 1/1/2020
@@ -148,6 +150,8 @@
148150
#endif
149151
#ifdef _CPPUNWIND
150152
#define TOML_COMPILER_EXCEPTIONS 1
153+
#else
154+
#define TOML_COMPILER_EXCEPTIONS 0
151155
#endif
152156

153157
#elif defined(__GNUC__)
@@ -170,6 +174,8 @@
170174
#endif
171175
#ifdef __cpp_exceptions
172176
#define TOML_COMPILER_EXCEPTIONS 1
177+
#else
178+
#define TOML_COMPILER_EXCEPTIONS 0
173179
#endif
174180

175181
// these pass the __has_attribute() test but cause warnings on if/else branches =/
@@ -200,7 +206,7 @@
200206
#define TOML_CPP 17
201207
#endif
202208
#ifndef TOML_COMPILER_EXCEPTIONS
203-
#define TOML_COMPILER_EXCEPTIONS 0
209+
#define TOML_COMPILER_EXCEPTIONS 1
204210
#endif
205211
#if TOML_COMPILER_EXCEPTIONS
206212
#ifndef TOML_EXCEPTIONS
@@ -222,9 +228,6 @@
222228
#define TOML_MAY_THROW_UNLESS(...) noexcept
223229
#define TOML_NS1_EX _noex
224230
#endif
225-
#ifndef TOML_DOXYGEN
226-
#define TOML_DOXYGEN 0
227-
#endif
228231
#ifndef TOML_DISABLE_INIT_WARNINGS
229232
#define TOML_DISABLE_INIT_WARNINGS
230233
#endif
@@ -305,8 +308,8 @@
305308
#endif
306309

307310
#define TOML_LIB_MAJOR 0
308-
#define TOML_LIB_MINOR 5
309-
#define TOML_LIB_PATCH 2
311+
#define TOML_LIB_MINOR 6
312+
#define TOML_LIB_PATCH 0
310313

311314
#define TOML_LANG_MAJOR 0
312315
#define TOML_LANG_MINOR 5
@@ -347,7 +350,7 @@
347350
#define TOML_NS4
348351
#define TOML_NS5
349352

350-
#if !TOML_DOXYGEN
353+
#ifndef DOXYGEN
351354

352355
#define TOML_START_2(VER, ARG1, ARG2, ARG3, ARG4, ARG5) \
353356
namespace toml { inline namespace v##VER##ARG1##ARG2##ARG3##ARG4##ARG5
@@ -448,6 +451,10 @@ TOML_START
448451

449452
#endif
450453

454+
#ifndef DOXYGEN
455+
456+
// foward declarations are hidden from doxygen
457+
// because they fuck it up =/
451458
struct date;
452459
struct time;
453460
struct time_offset;
@@ -460,6 +467,8 @@ TOML_START
460467
template <typename> class default_formatter;
461468
template <typename> class json_formatter;
462469

470+
#endif // !DOXYGEN
471+
463472
enum class node_type : uint8_t
464473
{
465474
none,
@@ -556,7 +565,7 @@ TOML_START
556565
TOML_PUSH_WARNINGS
557566
TOML_DISABLE_INIT_WARNINGS
558567

559-
#if TOML_DOXYGEN || !TOML_EXCEPTIONS
568+
#if defined(DOXYGEN) || !TOML_EXCEPTIONS
560569

561570
class parse_error final
562571
{
@@ -4732,7 +4741,7 @@ TOML_IMPL_END
47324741

47334742
TOML_START
47344743
{
4735-
#if TOML_DOXYGEN || !TOML_EXCEPTIONS
4744+
#if defined(DOXYGEN) || !TOML_EXCEPTIONS
47364745

47374746
class parse_result final
47384747
{
@@ -9200,7 +9209,6 @@ TOML_END
92009209
#undef TOML_STRING_PREFIX_1
92019210
#undef TOML_STRING_PREFIX
92029211
#undef TOML_UNDEF_MACROS
9203-
#undef TOML_DOXYGEN
92049212
#undef TOML_RELOPS_REORDERING
92059213
#undef TOML_ASYMMETRICAL_EQUALITY_OPS
92069214
#undef TOML_NS1_EX

0 commit comments

Comments
 (0)