YARP
Yet Another Robot Platform
system.h File Reference

Go to the source code of this file.

Macros

#define YARP_HAS_EXECINFO_H
 
#define YARP_HAS_SYS_WAIT_H
 
#define YARP_HAS_SYS_TYPES_H
 
#define YARP_HAS_SYS_PRCTL_H
 
#define YARP_HAS_SIGNAL_H
 
#define YARP_HAS_SYS_SIGNAL_H
 
#define YARP_HAS_NETDB_H
 
#define YARP_HAS_DLFCN_H
 
#define YARP_HAS_IFADDRS_H
 
#define YARP_POINTER_SIZE   8
 
#define YARP_DISABLE_CLASS_ENUM_API_WARNING
 
#define YARP_COMPILER_MESSAGE(x)
 Print a message at build time on supported compilers. More...
 
#define YARP_COMPILER_WARNING(x)
 Generate a warning at build time on supported compilers. More...
 
#define YARP_COMPILER_ERROR(x)
 Generate an error at build time on supported compilers. More...
 
#define YARP_COMPILER_DEPRECATED_WARNING(x)   YARP_COMPILER_WARNING(x)
 Generate a warning at build time on supported compilers if deprecated warnings are enabled. More...
 
#define YARP_BEGIN_PACK
 Starts 1 byte packing for structs/classes. More...
 
#define YARP_END_PACK
 Ends 1 byte packing for structs/classes. More...
 
#define YARP_WARNING_PUSH
 Starts a temporary alteration of the enabled warnings. More...
 
#define YARP_WARNING_POP
 Ends a temporary alteration of the enabled warnings. More...
 
#define YARP_DISABLE_DEPRECATED_WARNING
 Disable deprecated warnings in the following code. More...
 
#define YARP_DISABLE_DLL_INTERFACE_WARNING
 Disable MSVC C4251 warnings in the following code. More...
 
#define YARP_SUPPRESS_DLL_INTERFACE_WARNING
 Suppress MSVC C4251 warning for the next line. More...
 
#define YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG(x)   x
 Suppress MSVC C4251 warning for the declaration. More...
 
#define YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARGS(...)   __VA_ARGS__
 Suppress MSVC C4251 warning for the declaration. More...
 

Macro Definition Documentation

◆ YARP_BEGIN_PACK

#define YARP_BEGIN_PACK

Starts 1 byte packing for structs/classes.

Instructs the compiler that the following structure/class has to be packed with 1 byte boundary. This is conditionally generated depending on the compiler and architecture. It assures interoperability of network communication between compilers.

See also
Datatypes, YARP_END_PACK
Examples
port_power/TargetVer1.h, and port_power/TargetVer1b.h.

Definition at line 193 of file system.h.

◆ YARP_COMPILER_DEPRECATED_WARNING

#define YARP_COMPILER_DEPRECATED_WARNING (   x)    YARP_COMPILER_WARNING(x)

Generate a warning at build time on supported compilers if deprecated warnings are enabled.

This can be useful for example to deprecate a header file.

Parameters
xDeprecation message.
See also
YARP_COMPILER_MESSAGE, YARP_COMPILER_WARNING, YARP_COMPILER_ERROR

Definition at line 117 of file system.h.

◆ YARP_COMPILER_ERROR

#define YARP_COMPILER_ERROR (   x)

Generate an error at build time on supported compilers.

For example:

YARP_COMPILER_ERROR(This is a custom compiler error)

will generate an error "This is a custom compiler error".

Parameters
xError message.
See also
YARP_COMPILER_MESSAGE, YARP_COMPILER_WARNING, YARP_COMPILER_DEPRECATED_WARNING

Definition at line 113 of file system.h.

◆ YARP_COMPILER_MESSAGE

#define YARP_COMPILER_MESSAGE (   x)

Print a message at build time on supported compilers.

For example:

YARP_COMPILER_MESSAGE(This is a custom compiler message)

will print "This is a custom compiler message".

Parameters
xMessage.
See also
YARP_COMPILER_WARNING, YARP_COMPILER_ERROR, YARP_COMPILER_DEPRECATED_WARNING

Definition at line 111 of file system.h.

◆ YARP_COMPILER_WARNING

#define YARP_COMPILER_WARNING (   x)

Generate a warning at build time on supported compilers.

For example:

YARP_COMPILER_WARNING(This is a custom compiler warning)

will generate a warning "This is a custom compiler warning"

Parameters
xWarning message.
See also
YARP_COMPILER_MESSAGE, YARP_COMPILER_ERROR, YARP_COMPILER_DEPRECATED_WARNING

Definition at line 112 of file system.h.

◆ YARP_DISABLE_CLASS_ENUM_API_WARNING

#define YARP_DISABLE_CLASS_ENUM_API_WARNING

Definition at line 349 of file system.h.

◆ YARP_DISABLE_DEPRECATED_WARNING

#define YARP_DISABLE_DEPRECATED_WARNING

Disable deprecated warnings in the following code.

It should be used in this way:

See also
YARP_WARNING_PUSH, YARP_WARNING_POP

Definition at line 336 of file system.h.

◆ YARP_DISABLE_DLL_INTERFACE_WARNING

#define YARP_DISABLE_DLL_INTERFACE_WARNING

Disable MSVC C4251 warnings in the following code.

It should be used in this way:

See also
YARP_WARNING_PUSH, YARP_WARNING_POP, YARP_SUPPRESS_DLL_INTERFACE_WARNING, YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG, YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARGS

Definition at line 337 of file system.h.

◆ YARP_END_PACK

#define YARP_END_PACK

Ends 1 byte packing for structs/classes.

Instructs the compiler that the default packing can be reinstated.

See also
Datatypes YARP_BEGIN_PACK
Examples
port_power/TargetVer1.h, and port_power/TargetVer1b.h.

Definition at line 194 of file system.h.

◆ YARP_HAS_DLFCN_H

#define YARP_HAS_DLFCN_H

Definition at line 22 of file system.h.

◆ YARP_HAS_EXECINFO_H

#define YARP_HAS_EXECINFO_H

Definition at line 14 of file system.h.

◆ YARP_HAS_IFADDRS_H

#define YARP_HAS_IFADDRS_H

Definition at line 23 of file system.h.

◆ YARP_HAS_NETDB_H

#define YARP_HAS_NETDB_H

Definition at line 21 of file system.h.

◆ YARP_HAS_SIGNAL_H

#define YARP_HAS_SIGNAL_H

Definition at line 19 of file system.h.

◆ YARP_HAS_SYS_PRCTL_H

#define YARP_HAS_SYS_PRCTL_H

Definition at line 17 of file system.h.

◆ YARP_HAS_SYS_SIGNAL_H

#define YARP_HAS_SYS_SIGNAL_H

Definition at line 20 of file system.h.

◆ YARP_HAS_SYS_TYPES_H

#define YARP_HAS_SYS_TYPES_H

Definition at line 16 of file system.h.

◆ YARP_HAS_SYS_WAIT_H

#define YARP_HAS_SYS_WAIT_H

Definition at line 15 of file system.h.

◆ YARP_POINTER_SIZE

#define YARP_POINTER_SIZE   8

Definition at line 26 of file system.h.

◆ YARP_SUPPRESS_DLL_INTERFACE_WARNING

#define YARP_SUPPRESS_DLL_INTERFACE_WARNING

Suppress MSVC C4251 warning for the next line.

It should be used in this way:

static const std::string foo;
See also
YARP_DISABLE_DLL_INTERFACE_WARNING, YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG, YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARGS

Definition at line 338 of file system.h.

◆ YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG

#define YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG (   x)    x

Suppress MSVC C4251 warning for the declaration.

It should be used in this way:

Warning
As a side effect this macro suppresses the warning also for the following line.
See also
YARP_DISABLE_DLL_INTERFACE_WARNING, YARP_SUPPRESS_DLL_INTERFACE_WARNING, YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARGS

Definition at line 339 of file system.h.

◆ YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARGS

#define YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARGS (   ...)    __VA_ARGS__

Suppress MSVC C4251 warning for the declaration.

It should be used in this way:

Warning
As a side effect this macro suppresses the warning also for the following line.
This macro does not check the arguments, and it is therefore possible to write confusing declarations, it is recommended to use it only as suggested.
See also
YARP_DISABLE_DLL_INTERFACE_WARNING, YARP_SUPPRESS_DLL_INTERFACE_WARNING, YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG

Definition at line 340 of file system.h.

◆ YARP_WARNING_POP

#define YARP_WARNING_POP

Ends a temporary alteration of the enabled warnings.

See also
YARP_WARNING_PUSH

Definition at line 335 of file system.h.

◆ YARP_WARNING_PUSH

#define YARP_WARNING_PUSH

Starts a temporary alteration of the enabled warnings.

See also
YARP_WARNING_POP

Definition at line 334 of file system.h.

YARP_WARNING_PUSH
#define YARP_WARNING_PUSH
Starts a temporary alteration of the enabled warnings.
Definition: system.h:334
YARP_DISABLE_DLL_INTERFACE_WARNING
#define YARP_DISABLE_DLL_INTERFACE_WARNING
Disable MSVC C4251 warnings in the following code.
Definition: system.h:337
YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARGS
#define YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARGS(...)
Suppress MSVC C4251 warning for the declaration.
Definition: system.h:340
YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG
#define YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG(x)
Suppress MSVC C4251 warning for the declaration.
Definition: system.h:339
YARP_SUPPRESS_DLL_INTERFACE_WARNING
#define YARP_SUPPRESS_DLL_INTERFACE_WARNING
Suppress MSVC C4251 warning for the next line.
Definition: system.h:338
YARP_COMPILER_ERROR
#define YARP_COMPILER_ERROR(x)
Generate an error at build time on supported compilers.
Definition: system.h:113
YARP_WARNING_POP
#define YARP_WARNING_POP
Ends a temporary alteration of the enabled warnings.
Definition: system.h:335
YARP_COMPILER_WARNING
#define YARP_COMPILER_WARNING(x)
Generate a warning at build time on supported compilers.
Definition: system.h:112
YARP_DISABLE_DEPRECATED_WARNING
#define YARP_DISABLE_DEPRECATED_WARNING
Disable deprecated warnings in the following code.
Definition: system.h:336
YARP_COMPILER_MESSAGE
#define YARP_COMPILER_MESSAGE(x)
Print a message at build time on supported compilers.
Definition: system.h:111