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 200 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 124 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 120 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 118 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 119 of file system.h.

◆ YARP_DISABLE_CLASS_ENUM_API_WARNING

#define YARP_DISABLE_CLASS_ENUM_API_WARNING

Definition at line 356 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 343 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 344 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 201 of file system.h.

◆ YARP_HAS_DLFCN_H

#define YARP_HAS_DLFCN_H

Definition at line 29 of file system.h.

◆ YARP_HAS_EXECINFO_H

#define YARP_HAS_EXECINFO_H

Definition at line 21 of file system.h.

◆ YARP_HAS_IFADDRS_H

#define YARP_HAS_IFADDRS_H

Definition at line 30 of file system.h.

◆ YARP_HAS_NETDB_H

#define YARP_HAS_NETDB_H

Definition at line 28 of file system.h.

◆ YARP_HAS_SIGNAL_H

#define YARP_HAS_SIGNAL_H

Definition at line 26 of file system.h.

◆ YARP_HAS_SYS_PRCTL_H

#define YARP_HAS_SYS_PRCTL_H

Definition at line 24 of file system.h.

◆ YARP_HAS_SYS_SIGNAL_H

#define YARP_HAS_SYS_SIGNAL_H

Definition at line 27 of file system.h.

◆ YARP_HAS_SYS_TYPES_H

#define YARP_HAS_SYS_TYPES_H

Definition at line 23 of file system.h.

◆ YARP_HAS_SYS_WAIT_H

#define YARP_HAS_SYS_WAIT_H

Definition at line 22 of file system.h.

◆ YARP_POINTER_SIZE

#define YARP_POINTER_SIZE   8

Definition at line 33 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 345 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 346 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 347 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 342 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 341 of file system.h.