icedb
version 0.5.1
Snow particle scattering database API
|
Classes | |
struct | ICEDB_error_container_ftable |
A convenience wrapper for all error functions. More... | |
struct | ICEDB_error_context_var_val |
struct | ICEDB_error_context |
struct | ICEDB_error_context_container_ftable |
A convenience wrapper for all error functions. More... | |
Macros | |
#define | ICEDB_error_context_create(x) ICEDB_error_context_create_impl(x, (__FILE__), (int)__LINE__,(ICEDB_DEBUG_FSIG)); |
#define | ICEDB_error_context_append ICEDB_error_context_appendA |
#define | ICEDB_error_context_append_str ICEDB_error_context_append_strA |
#define | ICEDB_error_context_add_string ICEDB_error_context_add_stringA |
#define | ICEDB_error_context_add_string2 ICEDB_error_context_add_string2A |
Typedefs | |
typedef int | ICEDB_error_code |
typedef size_t(* | ICEDB_error_code_to_message_size_f) (ICEDB_error_code err) |
typedef size_t(* | ICEDB_error_code_to_message_f) (ICEDB_error_code err, size_t buf_size, char *buf) |
typedef size_t(* | ICEDB_error_code_to_stream_f) (ICEDB_error_code err, FILE *fp) |
typedef struct ICEDB_error_context *(* | ICEDB_get_error_context_thread_local_f) () |
typedef void(* | ICEDB_error_context_deallocate_f) (struct ICEDB_error_context *) |
typedef ICEDB_error_code(* | ICEDB_error_context_to_code_f) (const struct ICEDB_error_context *) |
typedef size_t(* | ICEDB_error_context_to_message_size_f) (const struct ICEDB_error_context *) |
typedef size_t(* | ICEDB_error_context_to_message_f) (const struct ICEDB_error_context *err, size_t buf_size, char *buf) |
typedef size_t(* | ICEDB_error_context_to_stream_f) (const struct ICEDB_error_context *err, FILE *fp) |
typedef ICEDB_error_code(* | ICEDB_error_test_f) () |
typedef const char *(* | ICEDB_error_getOSname_f) () |
Convenience function that returns an immutable string describing the OS type. Staticly allocated. More... | |
typedef struct ICEDB_error_context *(* | ICEDB_error_context_create_impl_f) (int, const char *, int, const char *) |
typedef struct ICEDB_error_context *(* | ICEDB_error_context_copy_f) (const struct ICEDB_error_context *) |
typedef void(* | ICEDB_error_context_appendA_f) (struct ICEDB_error_context *, size_t sz, const char *data) |
typedef void(* | ICEDB_error_context_append_strA_f) (struct ICEDB_error_context *, const char *data) |
typedef void(* | ICEDB_error_context_add_stringA_f) (struct ICEDB_error_context *, size_t var_sz, const char *var_name, size_t val_sz, const char *var_val) |
typedef void(* | ICEDB_error_context_add_string2A_f) (struct ICEDB_error_context *, const char *var_name, const char *var_val) |
typedef void(* | ICEDB_error_context_widen_f) (struct ICEDB_error_context *, size_t numNewSpaces) |
#define ICEDB_error_context_add_string ICEDB_error_context_add_stringA |
Definition at line 62 of file error_context.h.
Referenced by error_context_add_string2().
#define ICEDB_error_context_add_string2 ICEDB_error_context_add_string2A |
Definition at line 63 of file error_context.h.
Referenced by error_context_copy(), error_context_create_impl(), ICEDB_enumModules(), ICEDB_getPID(), ICEDB_getPPID(), ICEDB_pidExists(), and icedb::os_functions::populateOSstrings().
#define ICEDB_error_context_append ICEDB_error_context_appendA |
Definition at line 60 of file error_context.h.
Referenced by error_context_append_str().
#define ICEDB_error_context_append_str ICEDB_error_context_append_strA |
Definition at line 61 of file error_context.h.
Referenced by error_test().
#define ICEDB_error_context_create | ( | x | ) | ICEDB_error_context_create_impl(x, (__FILE__), (int)__LINE__,(ICEDB_DEBUG_FSIG)); |
Definition at line 35 of file error_context.h.
Referenced by error_context_copy(), error_test(), ICEDB_enumModules(), ICEDB_getCWDI(), ICEDB_getPID(), ICEDB_getPPID(), ICEDB_pidExists(), and icedb::os_functions::populateOSstrings().
typedef int ICEDB_error_code |
typedef size_t(* ICEDB_error_code_to_message_f) (ICEDB_error_code err, size_t buf_size, char *buf) |
Support function to turn the general error code into a human-readable message. This function safely writes the error string. The buffer will always be null-terminated, either at the end of the written string, or at the end of the buffer. To query the necessary buffer size before writing, see the ICEDB_error_code_to_message_size function.
err | is the error code in question. |
buf_size | is the size of the output buffer. |
buf | is the buffer. |
typedef size_t(* ICEDB_error_code_to_message_size_f) (ICEDB_error_code err) |
Support function to turn the general error code into a human-readable message. This function allows you to determine the size of the output buffer necessary to write the entire error message.
err | is the error code in question. |
typedef size_t(* ICEDB_error_code_to_stream_f) (ICEDB_error_code err, FILE *fp) |
Support function to write the error code to an output stream (C-style). This is a convenience function that allows for printing the error without an intermediate string copy, but streams are not thread-safe.
fp | is the FILE pointer. |
err | is the error code in question. |
typedef void(* ICEDB_error_context_add_string2A_f) (struct ICEDB_error_context *, const char *var_name, const char *var_val) |
Definition at line 51 of file error_context.h.
typedef void(* ICEDB_error_context_add_stringA_f) (struct ICEDB_error_context *, size_t var_sz, const char *var_name, size_t val_sz, const char *var_val) |
Add a string to the error context.
Definition at line 48 of file error_context.h.
typedef void(* ICEDB_error_context_append_strA_f) (struct ICEDB_error_context *, const char *data) |
Definition at line 43 of file error_context.h.
typedef void(* ICEDB_error_context_appendA_f) (struct ICEDB_error_context *, size_t sz, const char *data) |
Append extra information to the error context.
Definition at line 42 of file error_context.h.
typedef struct ICEDB_error_context*(* ICEDB_error_context_copy_f) (const struct ICEDB_error_context *) |
Copies an error context. Used in reporting to application.
Definition at line 38 of file error_context.h.
typedef struct ICEDB_error_context*(* ICEDB_error_context_create_impl_f) (int, const char *, int, const char *) |
Creates and stores an error context in the current thread. If another object is occupying the TLS, it is freed, so it is important to copy such objects using ICEDB_error_context_copy prior to read.
Definition at line 33 of file error_context.h.
typedef void(* ICEDB_error_context_deallocate_f) (struct ICEDB_error_context *) |
typedef ICEDB_error_code(* ICEDB_error_context_to_code_f) (const struct ICEDB_error_context *) |
typedef size_t(* ICEDB_error_context_to_message_f) (const struct ICEDB_error_context *err, size_t buf_size, char *buf) |
Support function to turn the general error code into a human-readable message. This function safely writes the error string. The buffer will always be null-terminated, either at the end of the written string, or at the end of the buffer. To query the necessary buffer size before writing, see the ICEDB_error_context_to_message_size function.
err | is the error context in question. |
buf_size | is the size of the output buffer. |
buf | is the buffer. |
typedef size_t(* ICEDB_error_context_to_message_size_f) (const struct ICEDB_error_context *) |
Determines the minimum buffer size for a human-readable representation of the ICEDB_error_context.
typedef size_t(* ICEDB_error_context_to_stream_f) (const struct ICEDB_error_context *err, FILE *fp) |
Support function to write the error code to an output stream (C-style). This is a convenience function that allows for printing the error without an intermediate string copy, but streams are not thread-safe.
fp | is the FILE pointer. |
err | is the error context in question. |
typedef void(* ICEDB_error_context_widen_f) (struct ICEDB_error_context *, size_t numNewSpaces) |
Widen the error_context var_vals array (safely and non-destructively)
Definition at line 56 of file error_context.h.
typedef const char*(* ICEDB_error_getOSname_f) () |
typedef ICEDB_error_code(* ICEDB_error_test_f) () |
typedef struct ICEDB_error_context*(* ICEDB_get_error_context_thread_local_f) () |
ICEDB_THREAD_LOCAL ICEDB_error_context* __ICEDB_LOCAL_THREAD_error_context |
Definition at line 8 of file error_context.cpp.
Referenced by error_context_create_impl(), and get_error_context_thread_local_c().
DL_ICEDB const struct ICEDB_error_container_ftable ICEDB_ct_error |
DL_ICEDB const struct ICEDB_error_context_container_ftable ICEDB_ct_error_context |
Definition at line 135 of file error_context.cpp.
DL_ICEDB ICEDB_error_code_to_message_f ICEDB_error_code_to_message |
DL_ICEDB ICEDB_error_code_to_message_size_f ICEDB_error_code_to_message_size |
DL_ICEDB ICEDB_error_code_to_stream_f ICEDB_error_code_to_stream |
DL_ICEDB ICEDB_error_context_add_string2A_f ICEDB_error_context_add_string2A |
Definition at line 105 of file error_context.cpp.
DL_ICEDB ICEDB_error_context_add_stringA_f ICEDB_error_context_add_stringA |
Definition at line 95 of file error_context.cpp.
DL_ICEDB ICEDB_error_context_append_strA_f ICEDB_error_context_append_strA |
Definition at line 85 of file error_context.cpp.
DL_ICEDB ICEDB_error_context_appendA_f ICEDB_error_context_appendA |
Definition at line 78 of file error_context.cpp.
DL_ICEDB ICEDB_error_context_copy_f ICEDB_error_context_copy |
Definition at line 55 of file error_context.cpp.
DL_ICEDB ICEDB_error_context_create_impl_f ICEDB_error_context_create_impl |
Definition at line 38 of file error_context.cpp.
DL_ICEDB ICEDB_error_context_deallocate_f ICEDB_error_context_deallocate |
DL_ICEDB ICEDB_error_context_to_code_f ICEDB_error_context_to_code |
Definition at line 21 of file error.cpp.
Referenced by icedb::error::error_context_to_code().
DL_ICEDB ICEDB_error_context_to_message_f ICEDB_error_context_to_message |
Definition at line 101 of file error.cpp.
Referenced by icedb::error::stringify().
DL_ICEDB ICEDB_error_context_to_message_size_f ICEDB_error_context_to_message_size |
Definition at line 61 of file error.cpp.
Referenced by icedb::error::stringify().
DL_ICEDB ICEDB_error_context_to_stream_f ICEDB_error_context_to_stream |
DL_ICEDB ICEDB_error_context_widen_f ICEDB_error_context_widen |
Definition at line 131 of file error_context.cpp.
Referenced by error_context_add_string(), and error_context_create_impl().
DL_ICEDB ICEDB_error_getOSname_f ICEDB_error_getOSname |
Definition at line 210 of file error.cpp.
Referenced by ICEDB_enumModules(), ICEDB_getPID(), ICEDB_getPPID(), ICEDB_pidExists(), and icedb::os_functions::populateOSstrings().
DL_ICEDB ICEDB_error_test_f ICEDB_error_test |
DL_ICEDB ICEDB_get_error_context_thread_local_f ICEDB_get_error_context_thread_local |