template <size_t Size, ThreadSafe IsThreadSafe = ThreadSafe::Yes>
class Name
Defined at line 31 of file ../../zircon/kernel/lib/fbl/include/fbl/name.h
A class for managing names of kernel objects. Since we don't want
unbounded lengths, the constructor and setter perform
truncation. Names include the trailing NUL as part of their
Size-sized buffer.
Public Methods
void Name<Size, IsThreadSafe> ()
Create an empty (i.e., "" with exactly 1 byte: a nul) Name.
Defined at line 38 of file ../../zircon/kernel/lib/fbl/include/fbl/name.h
void Name<Size, IsThreadSafe> (const char * name, size_t len)
Create a name from the given data. This will be guaranteed to
be nul terminated, so the given data may be truncated.
Defined at line 42 of file ../../zircon/kernel/lib/fbl/include/fbl/name.h
void ~Name<Size, IsThreadSafe> ()
Defined at line 44 of file ../../zircon/kernel/lib/fbl/include/fbl/name.h
void get (size_t out_len, char * out_name)
Copy the Name's data out. The written data is guaranteed to be
nul terminated, except when out_len is 0, in which case no data
is written.
Defined at line 49 of file ../../zircon/kernel/lib/fbl/include/fbl/name.h
zx_status_t set (const char * name, size_t len)
Reset the Name to the given data. This will be guaranteed to
be nul terminated, so the given data may be truncated.
Defined at line 59 of file ../../zircon/kernel/lib/fbl/include/fbl/name.h
Name<Size, IsThreadSafe> & operator= (const Name<Size, IsThreadSafe> & other)
Defined at line 72 of file ../../zircon/kernel/lib/fbl/include/fbl/name.h