JSON Voorhees
Killer JSON for C++
Loading...
Searching...
No Matches
config.hpp File Reference

Copyright (c) 2014-2020 by Travis Gockel. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define JSONV_VERSION_MAJOR   2
 
#define JSONV_VERSION_MINOR   0
 
#define JSONV_VERSION_PATCH   0
 
#define JSONV_VERSION   (JSONV_VERSION_MAJOR * 1000000 + JSONV_VERSION_MINOR * 1000 + JSONV_VERSION_PATCH)
 
#define JSONV_DEBUG   0
 Was JSON Voorhees compiled in debug mode? This value must be the same between when the SO was built and when you are compiling.
 
#define JSONV_SO   1
 Are you using shared objects (DLLs in Windows)?
 
#define JSONV_COMPILING   0
 Is JSON Voorhees currently compiling? You do not want to set this by hand.
 
#define JSONV_PUBLIC   JSONV_IMPORT
 This function or class is part of the public API for JSON Voorhees.
 
#define JSONV_LOCAL   JSONV_HIDDEN
 This function or class is internal-use only.
 
#define JSONV_UNUSED   [[maybe_unused]]
 Note that you know the variable is unused, but make the compiler stop complaining about it.
 
#define JSONV_NO_RETURN   [[noreturn]]
 Mark that a given function will never return control to the caller, either by exiting or throwing an exception.
 
#define JSONV_ALWAYS_INLINE
 Always inline the function this decorates, no matter what the compiler might think is best.
 
#define JSONV_INTEGER_ALTERNATES_LIST(item)
 An item list of types to also consider as an integer.
 
#define JSONV_LIKELY   [[likely]]
 Mark that a section of code is likely to be reached.
 
#define JSONV_UNLIKELY   [[unlikely]]
 Mark that a section of code is not likely to be reached.
 

Detailed Description

Copyright (c) 2014-2020 by Travis Gockel.

All rights reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the Apache License as published by the Apache Software Foundation, either version 2 of the License, or (at your option) any later version.

Author
Travis Gockel (travi.nosp@m.s@go.nosp@m.ckelh.nosp@m.ut.c.nosp@m.om)

Definition in file config.hpp.

Macro Definition Documentation

◆ JSONV_ALWAYS_INLINE

#define JSONV_ALWAYS_INLINE

Always inline the function this decorates, no matter what the compiler might think is best.

Definition at line 125 of file config.hpp.

◆ JSONV_COMPILING

#define JSONV_COMPILING   0

Is JSON Voorhees currently compiling? You do not want to set this by hand.

It is set by the build system when the library is compiled.

Definition at line 52 of file config.hpp.

◆ JSONV_DEBUG

#define JSONV_DEBUG   0

Was JSON Voorhees compiled in debug mode? This value must be the same between when the SO was built and when you are compiling.

In general, this is not useful outside of library maintainers.

Warning
Keep in mind this value is always defined. Use #if JSONV_DEBUG, not #ifdef JSONV_DEBUG.

Definition at line 36 of file config.hpp.

◆ JSONV_INTEGER_ALTERNATES_LIST

#define JSONV_INTEGER_ALTERNATES_LIST (   item)
Value:
item(int) \
item(unsigned int) \
item(unsigned long) \
item(unsigned long long)

An item list of types to also consider as an integer.

This mostly exists to help resolve the C-induced type ambiguity for the literal 0. It most prefers to be an int, but might also become a long or a pointer type.

Definition at line 134 of file config.hpp.

◆ JSONV_LIKELY

#define JSONV_LIKELY   [[likely]]

Mark that a section of code is likely to be reached.

See also
JSONV_UNLIKELY

Definition at line 146 of file config.hpp.

◆ JSONV_LOCAL

#define JSONV_LOCAL   JSONV_HIDDEN

This function or class is internal-use only.

See also
JSONV_HIDDEN

Definition at line 103 of file config.hpp.

◆ JSONV_NO_RETURN

#define JSONV_NO_RETURN   [[noreturn]]

Mark that a given function will never return control to the caller, either by exiting or throwing an exception.

Definition at line 116 of file config.hpp.

◆ JSONV_PUBLIC

#define JSONV_PUBLIC   JSONV_IMPORT

This function or class is part of the public API for JSON Voorhees.

If you are including JsonVoorhees for another library, this will have import semantics (JSONV_IMPORT); if you are building JsonVoorhees, this will have export semantics (JSONV_EXPORT).

Definition at line 102 of file config.hpp.

◆ JSONV_SO

#define JSONV_SO   1

Are you using shared objects (DLLs in Windows)?

Definition at line 42 of file config.hpp.

◆ JSONV_UNLIKELY

#define JSONV_UNLIKELY   [[unlikely]]

Mark that a section of code is not likely to be reached.

See also
JSONV_LIKELY

Definition at line 154 of file config.hpp.

◆ JSONV_UNUSED

#define JSONV_UNUSED   [[maybe_unused]]

Note that you know the variable is unused, but make the compiler stop complaining about it.

Definition at line 109 of file config.hpp.

◆ JSONV_VERSION

#define JSONV_VERSION   (JSONV_VERSION_MAJOR * 1000000 + JSONV_VERSION_MINOR * 1000 + JSONV_VERSION_PATCH)

Definition at line 26 of file config.hpp.

◆ JSONV_VERSION_MAJOR

#define JSONV_VERSION_MAJOR   2

Definition at line 21 of file config.hpp.

◆ JSONV_VERSION_MINOR

#define JSONV_VERSION_MINOR   0

Definition at line 22 of file config.hpp.

◆ JSONV_VERSION_PATCH

#define JSONV_VERSION_PATCH   0

Definition at line 23 of file config.hpp.