CAEN Utility  2.0.2
Utilities for CAEN projects
CAENUtility.h File Reference

Main header and generic tools. More...

#include <stddef.h>
Include dependency graph for CAENUtility.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CAEN_UTILITY_API
 
#define CAEN_UTILITY_DLLAPI   __attribute__((visibility("default")))
 
#define _c_macro_str_helper(x)   #x
 
#define c_macro_str(x)   _c_macro_str_helper(x)
 
#define c_unused_parameter(P)   ((void)(P))
 Platform independent macro to remove unreferenced parameter warning. More...
 
#define c_gcc_version   (-1)
 
#define c_clang_version   (-1)
 
#define c_msc_version   (-1)
 
#define c_compiler_version   "Unknown"
 
#define __declspec(A)
 Throw away GCC attributes from Visual Studio, and viceversa. More...
 
#define c_nop   ((void)0)
 No-operation macro (different from nop assemply instruction: this macro does not generate code) More...
 
#define c_attribute_format(_FMT_, _ARGS_)   __attribute__((__format__(__printf__, _FMT_, _ARGS_)))
 
#define c_attribute_alloc_size(...)   __attribute__(())
 
#define c_declspec_allocator   __declspec(allocator)
 
#define c_attribute_malloc   __attribute__((__malloc__))
 
#define c_attribute_pure   __attribute__((__pure__))
 
#define c_attribute_nonnull(...)   __attribute__((__nonnull__(__VA_ARGS__)))
 
#define c_attribute_fallthrough   c_nop
 
#define c_force_inline   inline
 
#define c_nodiscard
 
#define c_noreturn
 
#define c_acquires_lock_on_success(m)
 
#define c_releases_lock_on_success(m)
 
#define c_use_decl_annotations
 
#define c_likely(x)   (x)
 
#define c_unlikely(x)   (x)
 

Typedefs

typedef void(* c_funcptr_t) (void)
 Generic function pointer. More...
 

Enumerations

enum  c_type_t {
  TYPE_INT8 = 0, TYPE_UINT8 = 1, TYPE_INT16 = 2, TYPE_UINT16 = 3,
  TYPE_INT32 = 4, TYPE_UINT32 = 5, TYPE_INT64 = 6, TYPE_UINT64 = 7,
  TYPE_STRING = 8, TYPE_LONG = 9, TYPE_DOUBLE = 10, TYPE_CHAR = 11,
  TYPE_RESCODE = 12, TYPE_SHORT = 13, TYPE_MEMORY = 14, TYPE_NONE = 255
}
 Type of data. More...
 
enum  c_Utility_ErrorCode_t {
  c_Utility_ErrorCode_Success = 0, c_Utility_ErrorCode_GenericError = -1, c_Utility_ErrorCode_Map = -2, c_Utility_ErrorCode_Memory = -3,
  c_Utility_ErrorCode_NULL = -4
}
 Library return codes. More...
 

Functions

size_t c_srtrim (char *str, const char *remove)
 
size_t c_sltrim (char *str, const char *remove)
 
size_t c_strim (char *str, const char *remove)
 

Detailed Description

Main header and generic tools.

Author

Definition in file CAENUtility.h.

Macro Definition Documentation

◆ CAEN_UTILITY_API

#define CAEN_UTILITY_API

Definition at line 104 of file CAENUtility.h.

◆ CAEN_UTILITY_DLLAPI

#define CAEN_UTILITY_DLLAPI   __attribute__((visibility("default")))

Definition at line 105 of file CAENUtility.h.

◆ c_unused_parameter

#define c_unused_parameter (   P)    ((void)(P))

Platform independent macro to remove unreferenced parameter warning.

Definition at line 117 of file CAENUtility.h.

◆ __declspec

#define __declspec (   A)

Throw away GCC attributes from Visual Studio, and viceversa.

Definition at line 157 of file CAENUtility.h.

◆ c_nop

#define c_nop   ((void)0)

No-operation macro (different from nop assemply instruction: this macro does not generate code)

Definition at line 164 of file CAENUtility.h.

Typedef Documentation

◆ c_funcptr_t

typedef void(* c_funcptr_t) (void)

Generic function pointer.

Definition at line 328 of file CAENUtility.h.

Enumeration Type Documentation

◆ c_type_t

enum c_type_t

Type of data.

Enumerator
TYPE_INT8 
TYPE_UINT8 
TYPE_INT16 
TYPE_UINT16 
TYPE_INT32 
TYPE_UINT32 
TYPE_INT64 
TYPE_UINT64 
TYPE_STRING 
TYPE_LONG 
TYPE_DOUBLE 
TYPE_CHAR 
TYPE_RESCODE 
TYPE_SHORT 
TYPE_MEMORY 
TYPE_NONE 

Definition at line 298 of file CAENUtility.h.

◆ c_Utility_ErrorCode_t

Library return codes.

Enumerator
c_Utility_ErrorCode_Success 
c_Utility_ErrorCode_GenericError 
c_Utility_ErrorCode_Map 
c_Utility_ErrorCode_Memory 
c_Utility_ErrorCode_NULL 

Definition at line 319 of file CAENUtility.h.