Classes | Namespaces | Macros | Typedefs | Functions
stack.h File Reference
#include <openssl/base.h>
#include <openssl/type_check.h>
#include <type_traits>
Include dependency graph for stack.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  internal::DeleterImpl< Stack, typename std::enable_if< StackTraits< Stack >::kIsConst >::type >
 
struct  internal::DeleterImpl< Stack, typename std::enable_if<!StackTraits< Stack >::kIsConst >::type >
 
struct  stack_st
 
class  internal::StackIteratorImpl< Stack >
 
struct  internal::StackTraits< T >
 

Namespaces

 internal
 

Macros

#define BORINGSSL_DEFINE_STACK_OF_IMPL(name, ptrtype, constptrtype)
 
#define BORINGSSL_DEFINE_STACK_TRAITS(name, type, is_const)
 
#define DECLARE_STACK_OF(type)   STACK_OF(type);
 
#define DEFINE_CONST_STACK_OF(type)
 
#define DEFINE_NAMED_STACK_OF(name, type)
 
#define DEFINE_SPECIAL_STACK_OF(type)
 
#define DEFINE_STACK_OF(type)   DEFINE_NAMED_STACK_OF(type, type)
 
#define STACK_OF(type)   struct stack_st_##type
 

Typedefs

typedef struct stack_st _STACK
 
typedef char * OPENSSL_STRING
 
typedef int(* stack_cmp_func) (const void **a, const void **b)
 
typedef void *(* stack_copy_func) (void *ptr)
 
typedef void(* stack_free_func) (void *ptr)
 
template<typename Stack >
using internal::StackIterator = typename std::enable_if< StackTraits< Stack >::kIsStack, StackIteratorImpl< Stack > >::type
 

Functions

template<typename Stack >
BSSL_NAMESPACE_END bssl::internal::StackIterator< Stack > begin (const Stack *sk)
 
template<typename Stack >
bssl::internal::StackIterator< Stack > end (const Stack *sk)
 
template<typename Stack >
std::enable_if<!internal::StackTraits< Stack >::kIsConst, bool >::type PushToStack (Stack *sk, UniquePtr< typename internal::StackTraits< Stack >::Type > elem)
 
OPENSSL_EXPORT _STACKsk_deep_copy (const _STACK *sk, void *(*call_copy_func)(stack_copy_func, void *), stack_copy_func copy_func, void(*call_free_func)(stack_free_func, void *), stack_free_func free_func)
 
OPENSSL_EXPORT void * sk_delete (_STACK *sk, size_t where)
 
OPENSSL_EXPORT void * sk_delete_ptr (_STACK *sk, const void *p)
 
OPENSSL_EXPORT _STACKsk_dup (const _STACK *sk)
 
OPENSSL_EXPORT int sk_find (const _STACK *sk, size_t *out_index, const void *p, int(*call_cmp_func)(stack_cmp_func, const void **, const void **))
 
OPENSSL_EXPORT void sk_free (_STACK *sk)
 
OPENSSL_EXPORT size_t sk_insert (_STACK *sk, void *p, size_t where)
 
OPENSSL_EXPORT int sk_is_sorted (const _STACK *sk)
 
OPENSSL_EXPORT _STACKsk_new (stack_cmp_func comp)
 
OPENSSL_EXPORT _STACKsk_new_null (void)
 
OPENSSL_EXPORT size_t sk_num (const _STACK *sk)
 
OPENSSL_EXPORT void * sk_pop (_STACK *sk)
 
OPENSSL_EXPORT void sk_pop_free (_STACK *sk, stack_free_func free_func)
 
OPENSSL_EXPORT void sk_pop_free_ex (_STACK *sk, void(*call_free_func)(stack_free_func, void *), stack_free_func free_func)
 
OPENSSL_EXPORT size_t sk_push (_STACK *sk, void *p)
 
OPENSSL_EXPORT void * sk_set (_STACK *sk, size_t i, void *p)
 
OPENSSL_EXPORT stack_cmp_func sk_set_cmp_func (_STACK *sk, stack_cmp_func comp)
 
OPENSSL_EXPORT void * sk_shift (_STACK *sk)
 
OPENSSL_EXPORT void sk_sort (_STACK *sk)
 
OPENSSL_EXPORT void * sk_value (const _STACK *sk, size_t i)
 
OPENSSL_EXPORT void sk_zero (_STACK *sk)
 

Macro Definition Documentation

◆ BORINGSSL_DEFINE_STACK_OF_IMPL

#define BORINGSSL_DEFINE_STACK_OF_IMPL (   name,
  ptrtype,
  constptrtype 
)

Definition at line 279 of file stack.h.

◆ BORINGSSL_DEFINE_STACK_TRAITS

#define BORINGSSL_DEFINE_STACK_TRAITS (   name,
  type,
  is_const 
)
Value:
extern "C++" { \
BSSL_NAMESPACE_BEGIN \
namespace internal { \
template <> \
struct StackTraits<STACK_OF(name)> { \
static constexpr bool kIsStack = true; \
using Type = type; \
static constexpr bool kIsConst = is_const; \
}; \
} \
BSSL_NAMESPACE_END \
}

Definition at line 261 of file stack.h.

◆ DECLARE_STACK_OF

#define DECLARE_STACK_OF (   type)    STACK_OF(type);

Definition at line 127 of file stack.h.

◆ DEFINE_CONST_STACK_OF

#define DEFINE_CONST_STACK_OF (   type)
Value:
BORINGSSL_DEFINE_STACK_TRAITS(type, const type, true)

Definition at line 413 of file stack.h.

◆ DEFINE_NAMED_STACK_OF

#define DEFINE_NAMED_STACK_OF (   name,
  type 
)
Value:
BORINGSSL_DEFINE_STACK_TRAITS(name, type, false)

Definition at line 403 of file stack.h.

◆ DEFINE_SPECIAL_STACK_OF

#define DEFINE_SPECIAL_STACK_OF (   type)
Value:
OPENSSL_STATIC_ASSERT(sizeof(type) == sizeof(void *), \
#type " is not a pointer"); \
BORINGSSL_DEFINE_STACK_OF_IMPL(type, type, const type)

Definition at line 419 of file stack.h.

◆ DEFINE_STACK_OF

#define DEFINE_STACK_OF (   type)    DEFINE_NAMED_STACK_OF(type, type)

Definition at line 409 of file stack.h.

◆ STACK_OF

#define STACK_OF (   type)    struct stack_st_##type

Definition at line 125 of file stack.h.

Typedef Documentation

◆ _STACK

typedef struct stack_st _STACK

◆ OPENSSL_STRING

typedef char* OPENSSL_STRING

Definition at line 425 of file stack.h.

◆ stack_cmp_func

typedef int(* stack_cmp_func) (const void **a, const void **b)

Definition at line 106 of file stack.h.

◆ stack_copy_func

typedef void*(* stack_copy_func) (void *ptr)

Definition at line 97 of file stack.h.

◆ stack_free_func

typedef void(* stack_free_func) (void *ptr)

Definition at line 92 of file stack.h.

Function Documentation

◆ begin()

template<typename Stack >
BSSL_NAMESPACE_END bssl::internal::StackIterator<Stack> begin ( const Stack *  sk)
inline

Definition at line 529 of file stack.h.

◆ end()

template<typename Stack >
bssl::internal::StackIterator<Stack> end ( const Stack *  sk)
inline

Definition at line 534 of file stack.h.

◆ PushToStack()

template<typename Stack >
std::enable_if<!internal::StackTraits<Stack>::kIsConst, bool>::type PushToStack ( Stack *  sk,
UniquePtr< typename internal::StackTraits< Stack >::Type elem 
)
inline

Definition at line 515 of file stack.h.

◆ sk_deep_copy()

OPENSSL_EXPORT _STACK* sk_deep_copy ( const _STACK sk,
void *(*)(stack_copy_func, void *)  call_copy_func,
stack_copy_func  copy_func,
void(*)(stack_free_func, void *)  call_free_func,
stack_free_func  free_func 
)

Definition at line 398 of file stack.c.

◆ sk_delete()

OPENSSL_EXPORT void* sk_delete ( _STACK sk,
size_t  where 
)

Definition at line 204 of file stack.c.

◆ sk_delete_ptr()

OPENSSL_EXPORT void* sk_delete_ptr ( _STACK sk,
const void *  p 
)

Definition at line 222 of file stack.c.

◆ sk_dup()

OPENSSL_EXPORT _STACK* sk_dup ( const _STACK sk)

Definition at line 330 of file stack.c.

◆ sk_find()

OPENSSL_EXPORT int sk_find ( const _STACK sk,
size_t *  out_index,
const void *  p,
int(*)(stack_cmp_func, const void **, const void **)  call_cmp_func 
)

Definition at line 236 of file stack.c.

◆ sk_free()

OPENSSL_EXPORT void sk_free ( _STACK sk)

Definition at line 126 of file stack.c.

◆ sk_insert()

OPENSSL_EXPORT size_t sk_insert ( _STACK sk,
void *  p,
size_t  where 
)

Definition at line 159 of file stack.c.

◆ sk_is_sorted()

OPENSSL_EXPORT int sk_is_sorted ( const _STACK sk)

Definition at line 380 of file stack.c.

◆ sk_new()

Definition at line 70 of file stack.c.

◆ sk_new_null()

OPENSSL_EXPORT _STACK* sk_new_null ( void  )

Definition at line 94 of file stack.c.

◆ sk_num()

OPENSSL_EXPORT size_t sk_num ( const _STACK sk)

Definition at line 96 of file stack.c.

◆ sk_pop()

OPENSSL_EXPORT void* sk_pop ( _STACK sk)

Definition at line 320 of file stack.c.

◆ sk_pop_free()

OPENSSL_EXPORT void sk_pop_free ( _STACK sk,
stack_free_func  free_func 
)

Definition at line 155 of file stack.c.

◆ sk_pop_free_ex()

OPENSSL_EXPORT void sk_pop_free_ex ( _STACK sk,
void(*)(stack_free_func, void *)  call_free_func,
stack_free_func  free_func 
)

Definition at line 134 of file stack.c.

◆ sk_push()

OPENSSL_EXPORT size_t sk_push ( _STACK sk,
void *  p 
)

Definition at line 318 of file stack.c.

◆ sk_set()

OPENSSL_EXPORT void* sk_set ( _STACK sk,
size_t  i,
void *  p 
)

Definition at line 119 of file stack.c.

◆ sk_set_cmp_func()

OPENSSL_EXPORT stack_cmp_func sk_set_cmp_func ( _STACK sk,
stack_cmp_func  comp 
)

Definition at line 387 of file stack.c.

◆ sk_shift()

OPENSSL_EXPORT void* sk_shift ( _STACK sk)

Definition at line 308 of file stack.c.

◆ sk_sort()

OPENSSL_EXPORT void sk_sort ( _STACK sk)

Definition at line 358 of file stack.c.

◆ sk_value()

OPENSSL_EXPORT void* sk_value ( const _STACK sk,
size_t  i 
)

Definition at line 112 of file stack.c.

◆ sk_zero()

OPENSSL_EXPORT void sk_zero ( _STACK sk)

Definition at line 103 of file stack.c.

setup.name
name
Definition: setup.py:542
STACK_OF
#define STACK_OF(type)
Definition: stack.h:125
Type
Definition: bloaty/third_party/protobuf/src/google/protobuf/type.pb.h:182
BORINGSSL_DEFINE_STACK_OF_IMPL
#define BORINGSSL_DEFINE_STACK_OF_IMPL(name, ptrtype, constptrtype)
Definition: stack.h:279
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
OPENSSL_STATIC_ASSERT
#define OPENSSL_STATIC_ASSERT(cond, msg)
Definition: type_check.h:75


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:02:25