Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
grpc_core::ChannelArgs Class Reference

#include <channel_args.h>

Classes

class  Pointer
 

Public Types

using Value = absl::variant< int, std::string, Pointer >
 

Public Member Functions

 ChannelArgs ()
 
bool Contains (absl::string_view name) const
 
const ValueGet (absl::string_view name) const
 
absl::optional< boolGetBool (absl::string_view name) const
 
absl::optional< DurationGetDurationFromIntMillis (absl::string_view name) const
 
absl::optional< intGetInt (absl::string_view name) const
 
template<typename T >
TGetObject ()
 
template<typename T >
RefCountedPtr< TGetObjectRef ()
 
template<typename T >
TGetPointer (absl::string_view name) const
 
absl::optional< absl::string_viewGetString (absl::string_view name) const
 
void * GetVoidPointer (absl::string_view name) const
 
bool operator< (const ChannelArgs &other) const
 
bool operator== (const ChannelArgs &other) const
 
GRPC_MUST_USE_RESULT ChannelArgs Remove (absl::string_view name) const
 
GRPC_MUST_USE_RESULT ChannelArgs Set (absl::string_view name, absl::string_view value) const
 
GRPC_MUST_USE_RESULT ChannelArgs Set (absl::string_view name, const char *value) const
 
template<typename T >
GRPC_MUST_USE_RESULT auto Set (absl::string_view name, const RefCountedPtr< T > &value) const -> absl::enable_if_t< std::is_same< const grpc_arg_pointer_vtable *, decltype(ChannelArgTypeTraits< absl::remove_cvref_t< decltype(*value->Ref())>>::VTable())>::value, ChannelArgs >
 
GRPC_MUST_USE_RESULT ChannelArgs Set (absl::string_view name, std::string value) const
 
template<typename T >
GRPC_MUST_USE_RESULT absl::enable_if_t< std::is_same< const grpc_arg_pointer_vtable *, decltype(ChannelArgTypeTraits< T >::VTable())>::value, ChannelArgsSet (absl::string_view name, T *value) const
 
GRPC_MUST_USE_RESULT ChannelArgs Set (absl::string_view name, Value value) const
 
GRPC_MUST_USE_RESULT ChannelArgs Set (grpc_arg arg) const
 
template<typename T >
GRPC_MUST_USE_RESULT ChannelArgs SetIfUnset (absl::string_view name, T value)
 
template<typename T >
GRPC_MUST_USE_RESULT ChannelArgs SetObject (RefCountedPtr< T > p) const
 
template<typename T >
GRPC_MUST_USE_RESULT ChannelArgs SetObject (T *p) const
 
const grpc_channel_argsToC () const
 
std::string ToString () const
 
bool WantMinimalStack () const
 

Static Public Member Functions

static ChannelArgs FromC (const grpc_channel_args *args)
 

Private Member Functions

 ChannelArgs (AVL< std::string, Value > args)
 

Private Attributes

AVL< std::string, Valueargs_
 

Detailed Description

Definition at line 111 of file channel_args.h.

Member Typedef Documentation

◆ Value

Definition at line 160 of file channel_args.h.

Constructor & Destructor Documentation

◆ ChannelArgs() [1/2]

grpc_core::ChannelArgs::ChannelArgs ( )
default

◆ ChannelArgs() [2/2]

grpc_core::ChannelArgs::ChannelArgs ( AVL< std::string, Value args)
inlineexplicitprivate

Definition at line 261 of file channel_args.h.

Member Function Documentation

◆ Contains()

bool grpc_core::ChannelArgs::Contains ( absl::string_view  name) const
inline

Definition at line 210 of file channel_args.h.

◆ FromC()

ChannelArgs grpc_core::ChannelArgs::FromC ( const grpc_channel_args args)
static

Definition at line 84 of file channel_args.cc.

◆ Get()

const Value* grpc_core::ChannelArgs::Get ( absl::string_view  name) const
inline

Definition at line 169 of file channel_args.h.

◆ GetBool()

absl::optional< bool > grpc_core::ChannelArgs::GetBool ( absl::string_view  name) const

Definition at line 165 of file channel_args.cc.

◆ GetDurationFromIntMillis()

absl::optional< Duration > grpc_core::ChannelArgs::GetDurationFromIntMillis ( absl::string_view  name) const

Definition at line 141 of file channel_args.cc.

◆ GetInt()

absl::optional< int > grpc_core::ChannelArgs::GetInt ( absl::string_view  name) const

Definition at line 134 of file channel_args.cc.

◆ GetObject()

template<typename T >
T* grpc_core::ChannelArgs::GetObject ( )
inline

Definition at line 237 of file channel_args.h.

◆ GetObjectRef()

template<typename T >
RefCountedPtr<T> grpc_core::ChannelArgs::GetObjectRef ( )
inline

Definition at line 241 of file channel_args.h.

◆ GetPointer()

template<typename T >
T* grpc_core::ChannelArgs::GetPointer ( absl::string_view  name) const
inline

Definition at line 216 of file channel_args.h.

◆ GetString()

absl::optional< absl::string_view > grpc_core::ChannelArgs::GetString ( absl::string_view  name) const

Definition at line 150 of file channel_args.cc.

◆ GetVoidPointer()

void * grpc_core::ChannelArgs::GetVoidPointer ( absl::string_view  name) const

Definition at line 158 of file channel_args.cc.

◆ operator<()

bool grpc_core::ChannelArgs::operator< ( const ChannelArgs other) const
inline

Definition at line 247 of file channel_args.h.

◆ operator==()

bool grpc_core::ChannelArgs::operator== ( const ChannelArgs other) const
inline

Definition at line 248 of file channel_args.h.

◆ Remove()

ChannelArgs grpc_core::ChannelArgs::Remove ( absl::string_view  name) const

Definition at line 130 of file channel_args.cc.

◆ Set() [1/7]

ChannelArgs grpc_core::ChannelArgs::Set ( absl::string_view  name,
absl::string_view  value 
) const

Definition at line 117 of file channel_args.cc.

◆ Set() [2/7]

ChannelArgs grpc_core::ChannelArgs::Set ( absl::string_view  name,
const char *  value 
) const

Definition at line 122 of file channel_args.cc.

◆ Set() [3/7]

template<typename T >
GRPC_MUST_USE_RESULT auto grpc_core::ChannelArgs::Set ( absl::string_view  name,
const RefCountedPtr< T > &  value 
) const -> absl::enable_if_t< std::is_same< const grpc_arg_pointer_vtable*, decltype(ChannelArgTypeTraits<absl::remove_cvref_t< decltype(*value->Ref())>>::VTable())>::value, ChannelArgs>
inline

Definition at line 189 of file channel_args.h.

◆ Set() [4/7]

ChannelArgs grpc_core::ChannelArgs::Set ( absl::string_view  name,
std::string  value 
) const

Definition at line 126 of file channel_args.cc.

◆ Set() [5/7]

template<typename T >
GRPC_MUST_USE_RESULT absl::enable_if_t< std::is_same<const grpc_arg_pointer_vtable*, decltype(ChannelArgTypeTraits<T>::VTable())>::value, ChannelArgs> grpc_core::ChannelArgs::Set ( absl::string_view  name,
T value 
) const
inline

Definition at line 184 of file channel_args.h.

◆ Set() [6/7]

ChannelArgs grpc_core::ChannelArgs::Set ( absl::string_view  name,
Value  value 
) const

Definition at line 113 of file channel_args.cc.

◆ Set() [7/7]

ChannelArgs grpc_core::ChannelArgs::Set ( grpc_arg  arg) const

Definition at line 69 of file channel_args.cc.

◆ SetIfUnset()

template<typename T >
GRPC_MUST_USE_RESULT ChannelArgs grpc_core::ChannelArgs::SetIfUnset ( absl::string_view  name,
T  value 
)
inline

Definition at line 205 of file channel_args.h.

◆ SetObject() [1/2]

template<typename T >
GRPC_MUST_USE_RESULT ChannelArgs grpc_core::ChannelArgs::SetObject ( RefCountedPtr< T p) const
inline

Definition at line 233 of file channel_args.h.

◆ SetObject() [2/2]

template<typename T >
GRPC_MUST_USE_RESULT ChannelArgs grpc_core::ChannelArgs::SetObject ( T p) const
inline

Definition at line 229 of file channel_args.h.

◆ ToC()

const grpc_channel_args * grpc_core::ChannelArgs::ToC ( ) const

Definition at line 94 of file channel_args.cc.

◆ ToString()

std::string grpc_core::ChannelArgs::ToString ( ) const

Definition at line 186 of file channel_args.cc.

◆ WantMinimalStack()

bool grpc_core::ChannelArgs::WantMinimalStack ( ) const
inline

Definition at line 254 of file channel_args.h.

Member Data Documentation

◆ args_

AVL<std::string, Value> grpc_core::ChannelArgs::args_
private

Definition at line 263 of file channel_args.h.


The documentation for this class was generated from the following files:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:35