Crashpad
Public Member Functions | List of all members
crashpad::StringAnnotation< MaxSize > Class Template Reference

An. More...

#include "client/annotation.h"

Inheritance diagram for crashpad::StringAnnotation< MaxSize >:
crashpad::Annotation

Public Member Functions

constexpr StringAnnotation (const char name[])
 Constructs a new StringAnnotation with the given name. More...
 
void Set (const char *value)
 Sets the Annotation's string value. More...
 
- Public Member Functions inherited from crashpad::Annotation
constexpr Annotation (Type type, const char name[], void *const value_ptr)
 Constructs a new annotation. More...
 
void SetSize (ValueSizeType size)
 Specifies the number of bytes in value_ptr_ to include when generating a crash report. More...
 
void Clear ()
 Marks the annotation as cleared, indicating the value_ptr_ should not be included in a crash report. More...
 
bool is_set () const
 Tests whether the annotation has been set.
 
Type type () const
 
ValueSizeType size () const
 
const char * name () const
 
const void * value () const
 

Additional Inherited Members

- Public Types inherited from crashpad::Annotation
enum  Type : uint16_t
 The type of data stored in the annotation. More...
 
using ValueSizeType = uint32_t
 The type used for SetSize().
 
- Static Public Member Functions inherited from crashpad::Annotation
static constexpr Type UserDefinedType (uint16_t value)
 Creates a user-defined Annotation::Type. More...
 
- Static Public Attributes inherited from crashpad::Annotation
static constexpr size_t kNameMaxLength = 64
 The maximum length of an annotation’s name, in bytes.
 
static constexpr size_t kValueMaxSize = 2048
 The maximum size of an annotation’s value, in bytes.
 
- Protected Member Functions inherited from crashpad::Annotation
std::atomic< Annotation * > & link_node ()
 

Detailed Description

template<Annotation::ValueSizeType MaxSize>
class crashpad::StringAnnotation< MaxSize >

An.

See also
Annotation that stores a NUL-terminated C-string value.

The storage for the value is allocated by the annotation and the template parameter MaxSize controls the maxmium length for the value.

It is expected that the string value be valid UTF-8, although this is not validated.

Constructor & Destructor Documentation

◆ StringAnnotation()

template<Annotation::ValueSizeType MaxSize>
constexpr crashpad::StringAnnotation< MaxSize >::StringAnnotation ( const char  name[])
inlineexplicit

Constructs a new StringAnnotation with the given name.

Parameters
[in]nameThe Annotation name.

Member Function Documentation

◆ Set()

template<Annotation::ValueSizeType MaxSize>
void crashpad::StringAnnotation< MaxSize >::Set ( const char *  value)
inline

Sets the Annotation's string value.

Parameters
[in]valueThe NUL-terminated C-string value.

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