![]() |
MOS Source Code
|
#include <string.hpp>
Public Member Functions | |
basic_string (std::nullptr_t)=delete | |
basic_string () | |
basic_string (const Char *buffer) | |
basic_string (const Char *buffer, size_t size) | |
template<class StringViewLike> | |
basic_string (const StringViewLike &view) | |
basic_string (size_t size, Char c=0) | |
basic_string (const basic_string &other) | |
basic_string (basic_string &&other) | |
~basic_string () | |
basic_string & | operator= (const Char *buffer) |
basic_string & | operator= (const mos::basic_string_view< Char > &view) |
basic_string & | operator= (basic_string &&other) |
basic_string & | operator= (const basic_string &other) |
void | resize (size_t new_length) |
basic_string | operator+ (const basic_string &other) const |
basic_string | operator+ (Char c) const |
void | push_back (Char c) |
basic_string & | operator+= (const basic_string_view< Char > &other) |
basic_string & | operator+= (Char c) |
const Char * | data () const |
const Char * | c_str () const |
Char & | operator[] (size_t index) |
const Char & | operator[] (size_t index) const |
size_t | size () const |
bool | empty () const |
Char * | begin () |
const Char * | begin () const |
Char * | end () |
const Char * | end () const |
bool | operator== (const basic_string &other) const |
bool | operator== (const char *rhs) const |
operator basic_string_view< Char > () const | |
bool | operator== (std::nullptr_t) const =delete |
Private Member Functions | |
void | _init (const Char *buffer, size_t size) |
int | _do_compare (const Char *other, const size_t other_size) const |
void | _convert_to_long (size_t new_length=0) |
void | _convert_to_short () |
Private Attributes | ||
bool | _is_long = false | |
size_t | _length | |
string length excluding null terminator | ||
union { | ||
struct _long_buffer { | ||
Char * _buffer | ||
size_t _capacity | ||
buffer capacity includes null terminator More... | ||
} _long | ||
struct _short_buffer { | ||
Char _buffer [short_string_capacity] | ||
} _short | ||
} | _data | |
Friends | |
basic_string | operator+ (const basic_string_view< Char > &lhs, const basic_string &rhs) |
Definition at line 15 of file string.hpp.
|
delete |
|
inline |
Definition at line 37 of file string.hpp.
Referenced by basic_string< char, mos::default_allocator >::operator+.
|
inline |
Definition at line 39 of file string.hpp.
|
inlineexplicit |
Definition at line 44 of file string.hpp.
|
inlineexplicit |
Definition at line 50 of file string.hpp.
|
inline |
Definition at line 55 of file string.hpp.
|
inline |
Definition at line 60 of file string.hpp.
|
inline |
Definition at line 65 of file string.hpp.
|
inline |
Definition at line 82 of file string.hpp.
Referenced by basic_string< char, mos::default_allocator >::operator=(), basic_string< char, mos::default_allocator >::operator=(), and basic_string< char, mos::default_allocator >::operator=().
|
inline |
Definition at line 88 of file string.hpp.
|
inline |
Definition at line 108 of file string.hpp.
|
inline |
Definition at line 128 of file string.hpp.
|
inline |
Definition at line 147 of file string.hpp.
Definition at line 158 of file string.hpp.
|
inline |
Definition at line 169 of file string.hpp.
|
inline |
Definition at line 175 of file string.hpp.
|
inline |
Definition at line 180 of file string.hpp.
|
inline |
Definition at line 185 of file string.hpp.
Referenced by basic_string< char, mos::default_allocator >::operator+=(), and basic_string< char, mos::default_allocator >::push_back().
|
inline |
Definition at line 205 of file string.hpp.
|
inline |
Definition at line 210 of file string.hpp.
Referenced by basic_string< char, mos::default_allocator >::_do_compare(), basic_string< char, mos::default_allocator >::basic_string(), basic_string< char, mos::default_allocator >::c_str(), MOS_STATIC_ASSERT(), operator basic_string_view< Char >(), basic_string< char, mos::default_allocator >::operator=(), basic_string< char, mos::default_allocator >::operator==(), and vsnprintf_do_pointer_kernel().
|
inline |
Definition at line 215 of file string.hpp.
Referenced by elf_create_process(), elf_do_fill_process(), elf_fill_process(), elf_map_interpreter(), ipc_connect_to_server(), ipc_server_accept(), sysfs_fops_release(), sysfs_register(), sysfs_register_file(), userfs_ensure_connected(), userfs_fsop_mount(), vfs_mount(), and vfs_register_filesystem().
|
inline |
Definition at line 220 of file string.hpp.
|
inline |
Definition at line 225 of file string.hpp.
|
inline |
Definition at line 230 of file string.hpp.
Referenced by basic_string< char, mos::default_allocator >::basic_string(), basic_string< char, mos::default_allocator >::operator=(), and basic_string< char, mos::default_allocator >::operator==().
|
inline |
Definition at line 235 of file string.hpp.
Referenced by dentry_check_refstat(), dentry_mount(), dentry_path(), dentry_root_get_mountpoint(), dentry_unref_one_norelease(), sysfs_register_file(), and vsnprintf_do_pointer_kernel().
|
inline |
Definition at line 240 of file string.hpp.
|
inline |
Definition at line 245 of file string.hpp.
|
inline |
Definition at line 250 of file string.hpp.
|
inline |
Definition at line 255 of file string.hpp.
|
inline |
Definition at line 260 of file string.hpp.
|
inline |
Definition at line 265 of file string.hpp.
|
inline |
|
delete |
|
inlineprivate |
Definition at line 278 of file string.hpp.
Referenced by basic_string< char, mos::default_allocator >::basic_string(), basic_string< char, mos::default_allocator >::basic_string(), basic_string< char, mos::default_allocator >::basic_string(), basic_string< char, mos::default_allocator >::basic_string(), basic_string< char, mos::default_allocator >::basic_string(), and basic_string< char, mos::default_allocator >::operator=().
|
inlineprivate |
Definition at line 297 of file string.hpp.
Referenced by basic_string< char, mos::default_allocator >::operator==(), and basic_string< char, mos::default_allocator >::operator==().
|
inlineprivate |
Definition at line 305 of file string.hpp.
Referenced by basic_string< char, mos::default_allocator >::operator+=(), and basic_string< char, mos::default_allocator >::resize().
|
inlineprivate |
Definition at line 320 of file string.hpp.
Referenced by basic_string< char, mos::default_allocator >::resize().
|
friend |
Definition at line 153 of file string.hpp.
Referenced by basic_string< char, mos::default_allocator >::operator+().
Definition at line 17 of file string.hpp.
|
private |
string length excluding null terminator
Definition at line 18 of file string.hpp.
Referenced by operator basic_string_view< Char >().
Char* _buffer |
Definition at line 24 of file string.hpp.
size_t _capacity |
buffer capacity includes null terminator
Definition at line 25 of file string.hpp.
struct { ... } ::_long_buffer _long |
Char _buffer[short_string_capacity] |
Definition at line 30 of file string.hpp.
struct { ... } ::_short_buffer _short |
union { ... } _data |