Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ahDefs.H File Reference

Core definitions, constants, and utility macros for Aleph-w. More...

#include <unistd.h>
#include <time.h>
#include <stdint.h>
#include <cstdlib>
#include <cstdio>
#include <cstdarg>
#include <stdexcept>
#include <utility>
#include <iostream>
Include dependency graph for ahDefs.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Aleph::Empty_Class
 Empty placeholder class with no data members. More...
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 

Macros

#define MESSAGE(format, args...)
 Print an informational message (no-op when MESSAGES is not defined).
 
#define WARNING(format, args...)
 Print a warning message (no-op when MESSAGES is not defined).
 
#define AH_ERROR(format, args...)    Aleph::error(__FILE__, __LINE__, format , ##args)
 Print an error message (always enabled).
 
#define EXIT(format, args...)    Aleph::exit(__FILE__, __LINE__, format , ##args)
 Print a message and exit the program (always enabled).
 
#define POINTER_HAS_BEEN_FOUND(ptr)   ((ptr) not_eq nullptr)
 Check if a pointer was found (not null).
 
#define POINTER_HAS_NOT_BEEN_FOUND(ptr)   ((ptr) == nullptr)
 Check if a pointer was not found (is null).
 
#define Exception_Prototypes(list...)   throw(std::exception, ##list)
 Exception specification macro (deprecated in modern C++).
 

Typedefs

typedef uint32_t Aleph::IPv4_Address
 Type alias for IPv4 addresses stored as 32-bit integers.
 

Enumerations

enum  EmptyCtor { emptyCtor }
 Tag type for empty/default construction. More...
 
enum  NoExceptionCtor { no_exception_ctor }
 Tag type for no-exception construction. More...
 
enum  SentinelCtor { sentinelCtor }
 Tag type for sentinel node construction. More...
 

Functions

void Aleph::message (const char *file, int line, const char *format,...)
 Print an informational message with file and line info.
 
void Aleph::error (const char *file, int line, const char *format,...)
 Print an error message with file and line info.
 
void Aleph::exit (const char *file, int line, const char *format,...)
 Print a message and exit the program.
 
void Aleph::warning (const char *file, int line, const char *format,...)
 Print a warning message with file and line info.
 
void Aleph::syslog (const char *format, va_list ap)
 Write a message to syslog.
 

Variables

const int Aleph::UnknownSize = -1
 Constant indicating unknown size.
 
const int Aleph::UnknownLine = -1
 Constant indicating unknown line number.
 
const int Aleph::UnknownLoad = -1
 Constant indicating unknown load factor.
 

Detailed Description

Core definitions, constants, and utility macros for Aleph-w.

This header provides fundamental type definitions, utility classes, global configuration variables, and diagnostic macros used throughout the Aleph-w library.

Author
Leandro Rabindranath León

Definition in file ahDefs.H.

Macro Definition Documentation

◆ AH_ERROR

#define AH_ERROR (   format,
  args... 
)     Aleph::error(__FILE__, __LINE__, format , ##args)

Print an error message (always enabled).

Parameters
formatPrintf-style format string.
argsFormat arguments.

Definition at line 271 of file ahDefs.H.

◆ Exception_Prototypes

#define Exception_Prototypes (   list...)    throw(std::exception, ##list)

Exception specification macro (deprecated in modern C++).

Parameters
listException types that may be thrown.
Deprecated:
Exception specifications are deprecated in C++17 and removed in C++20.

Definition at line 301 of file ahDefs.H.

◆ EXIT

#define EXIT (   format,
  args... 
)     Aleph::exit(__FILE__, __LINE__, format , ##args)

Print a message and exit the program (always enabled).

Parameters
formatPrintf-style format string.
argsFormat arguments.

Definition at line 279 of file ahDefs.H.

◆ MESSAGE

#define MESSAGE (   format,
  args... 
)

Print an informational message (no-op when MESSAGES is not defined).

Definition at line 259 of file ahDefs.H.

◆ POINTER_HAS_BEEN_FOUND

#define POINTER_HAS_BEEN_FOUND (   ptr)    ((ptr) not_eq nullptr)

Check if a pointer was found (not null).

Parameters
ptrPointer to check.
Returns
true if ptr is not nullptr.

Definition at line 287 of file ahDefs.H.

◆ POINTER_HAS_NOT_BEEN_FOUND

#define POINTER_HAS_NOT_BEEN_FOUND (   ptr)    ((ptr) == nullptr)

Check if a pointer was not found (is null).

Parameters
ptrPointer to check.
Returns
true if ptr is nullptr.

Definition at line 294 of file ahDefs.H.

◆ WARNING

#define WARNING (   format,
  args... 
)

Print a warning message (no-op when MESSAGES is not defined).

Definition at line 262 of file ahDefs.H.

Enumeration Type Documentation

◆ EmptyCtor

enum EmptyCtor

Tag type for empty/default construction.

Used to select constructors that perform minimal or no initialization.

Enumerator
emptyCtor 

Definition at line 64 of file ahDefs.H.

◆ NoExceptionCtor

Tag type for no-exception construction.

Used to select constructors that guarantee no exceptions will be thrown.

Enumerator
no_exception_ctor 

Definition at line 72 of file ahDefs.H.

◆ SentinelCtor

Tag type for sentinel node construction.

Used to select constructors that create sentinel/guard nodes in linked data structures.

Enumerator
sentinelCtor 

Definition at line 81 of file ahDefs.H.