The methods are documented in alphabetical order, which may not be their place in the code.</br>
Excepting the constructors, which is at the start, and the destructor, at the end.
Bytes_Set()
Most simple Bytes_Set constructor, which does not allocate datas in the memory.
This function was added in the version 0.1 and last edited in the version 0.1.
Bytes_Set(unsigned int new_datas_size)
Advanced Bytes_Set constructor, creating the datas empty of the object of size "new_datas_size".
This function was added in the version 0.1 and last edited in the version 0.1.
Bytes_Set(char* new_datas, unsigned int new_datas_size)
Advanced Bytes_Set constructor, putting the datas of the object to "new_datas" and the size of the datas to "new_datas_size".
This function was added in the version 0.1 and last edited in the version 0.1.
Bytes_Set(const Bytes_Set& byte_set)
Bytes_Set copy constructor, putting the datas of the object to copied "byte_set" datas, same for the size of the datas.
This function was added in the version 0.1 and last edited in the version 0.1.
void add_data(char data)
Add "data" at the end of the datas in the object.
This function was added in the version 0.1 and last edited in the version 0.1.
void add_datas(char* datas_to_add, unsigned int datas_to_add_size)
Add copied "datas_to_add" of size "datas_to_add_size" at the end of the datas in the object.
This function was added in the version 0.1 and last edited in the version 0.1.
void add_datas(const char* datas_to_add, unsigned int datas_to_add_size)
Add copied "datas_to_add" of size "datas_to_add_size" at the end of the datas in the object.
This function was added in the version 0.1 and last edited in the version 0.1.
void add_double(double data, bool big_endian = false)
Add the double "data" at the end of the datas in the object, in big-endian or not depending to "big_endian" value.
This function was added in the version 0.1 and last edited in the version 0.1.
void add_float(float data, bool big_endian = false)
Add the float "data" at the end of the datas in the object, in big-endian or not depending to "big_endian" value.</br>
WARNING : for now, this function only convert the float to a double and use "add_double". So, it can occurs to unexpected behaviors in some cases.
This function was added in the version 0.1 and last edited in the version 0.1.
void add_int(int data, bool big_endian = false)
Add the int "data" at the end of the datas in the object, in big-endian or not depending to "big_endian" value.
This function was added in the version 0.1 and last edited in the version 0.1.
void add_int64(int64_t data, bool big_endian = false)
Add the int64_t "data" at the end of the datas in the object, in big-endian or not depending to "big_endian" value.
This function was added in the version 0.1 and last edited in the version 0.1.
void add_short(short data, bool big_endian = false)
Add the short "data" at the end of the datas in the object, in big-endian or not depending to "big_endian" value.
This function was added in the version 0.1 and last edited in the version 0.1.
void add_string(std::string data)
Add the std::string "data" at the end of the datas in the object, by default encoded in UTF-8 (if you well configured your encoder).
This function was added in the version 0.1 and last edited in the version 0.1.
void add_uint(unsigned int data, bool big_endian = false)
Add the unsigned int "data" at the end of the datas in the object, in big-endian or not depending to "big_endian" value.
This function was added in the version 0.1 and last edited in the version 0.1.
void add_ushort(unsigned short data, bool big_endian = false)
Add the unsigned short "data" at the end of the datas in the object, in big-endian or not depending to "big_endian" value.
This function was added in the version 0.1 and last edited in the version 0.1.
char* datas() const
Return the datas into the object.
This function was added in the version 0.1 and last edited in the version 0.1.
unsigned int datas_size() const
Return the size of the datas into the object.
This function was added in the version 0.1 and last edited in the version 0.1.
char data_at(unsigned int position)
Return the data at the position "position" in the datas.</br>
If the position is not in the datas field, the SCLS print function is used to tell it to the user, and the function return 0.</br>
It is HIGLY RECOMMENDED to use this function to access datas without the "extract" functions, because it can avoid buffer overflow.
This function was added in the version 0.1 and last edited in the version 0.1.
char extract_data(unsigned int offset = 0)
Extract and return a byte, with a position offset of "offset".
This function was added in the version 0.1 and last edited in the version 0.1.
char* extract_datas(unsigned int extract_size, unsigned int offset = 0, bool inverse = false)
Extract and return a "extract_size" sized amount of data, with a position offset of "offset", inversed or not depending to "inverse".
This function was added in the version 0.1 and last edited in the version 0.1.
double extract_double(unsigned int offset = 0, bool big_endian = false)
Extract and return a double, with a position offset of "offset", in big_endian or not depending to "big_endian".
This function was added in the version 0.1 and last edited in the version 0.1.
float extract_float(unsigned int offset = 0, bool big_endian = false)
Extract and return a float, with a position offset of "offset", in big_endian or not depending to "big_endian".</br>
WARNING : for now, this function only convert the float to a double and use "extract_double". So, it can occurs to unexpected behaviors in some cases.
This function was added in the version 0.1 and last edited in the version 0.1.
int extract_int(unsigned int offset = 0, bool big_endian = false)
Extract and return an int, with a position offset of "offset", in big_endian or not depending to "big_endian".
This function was added in the version 0.1 and last edited in the version 0.1.
int extract_int64(unsigned int offset = 0, bool big_endian = false)
Extract and return an int64_t, with a position offset of "offset", in big_endian or not depending to "big_endian".
This function was added in the version 0.1 and last edited in the version 0.1.
short extract_short(unsigned int offset = 0, bool big_endian = false)
Extract and return a short, with a position offset of "offset", in big_endian or not depending to "big_endian".
This function was added in the version 0.1 and last edited in the version 0.1.
std::string extract_string(unsigned int extract_size, unsigned int offset = 0)
Extract and return a std::string of size "extract_size", with a position offset of "offset".
This function was added in the version 0.1 and last edited in the version 0.1.
unsigned int extract_uint(unsigned int offset = 0, bool big_endian = false)
Extract and return an unsigned int, with a position offset of "offset", in big_endian or not depending to "big_endian".
This function was added in the version 0.1 and last edited in the version 0.1.
unsigned short extract_ushort(unsigned int offset = 0, bool big_endian = false)
Extract and return an unsigned short, with a position offset of "offset", in big_endian or not depending to "big_endian".
This function was added in the version 0.1 and last edited in the version 0.1.
void free_memory()
Free the memory of the datas, and reset the datas.</br>
If the datas are a "0" pointer, then the memory is freed.
This function was added in the version 0.1 and last edited in the version 0.1.
bool load_from_file(std::string path)
Load the datas of the object from a file at the path "path" and return file is all is good.</br>
If the path does not exist, the object is not loaded and "false" is returned.
This function was added in the version 0.1 and last edited in the version 0.1.
void save(std::string path)
Save the datas of the object in a file at the path "path".
This function was added in the version 0.1 and last edited in the version 0.1.
void set_data_at(unsigned int position, char new_data)
Set the data at the position "position" at "new_data".
This function was added in the version 0.1 and last edited in the version 0.1.
~Bytes_Set()
Bytes_Set class destructor, calling the "free_memory" function.
This function was added in the version 0.1 and last edited in the version 0.1.