WordNumber struct. More...
#include <BigWordNumber_private.h>
Data Fields | |
string_ptr | parsedString |
WordNumberValue | value |
WordNumberValue_intern | value |
int | width |
Related Functions | |
(Note that these are not member functions.) | |
WordNumberValue | word_number_to_signed_c_value (const WordNumber_ptr self) |
boolean | WordNumber_get_bit (WordNumber_ptr self, int n) |
returns the status (true or false) of a particular bit | |
const char * | WordNumber_get_parsed_string (WordNumber_ptr self) |
returns a string which was given to WordNumber_from_parsed_string constructor. Always returns NULL, this method is kept for backwards compability | |
boolean | WordNumber_get_sign (WordNumber_ptr self) |
returns the status (true or false) of the sign bit | |
signed long long | WordNumber_get_signed_value (WordNumber_ptr self) |
returns the value of a WordNumber, interpreted as a signed word | |
unsigned long long | WordNumber_get_unsigned_value (WordNumber_ptr self) |
returns the value of a WordNumber, as unsigned word | |
int | WordNumber_get_width (WordNumber_ptr self) |
returns the width of a WordNumber | |
char * | WordNumber_to_based_string (WordNumber_ptr self, int base, boolean isSigned) |
prints a Word constant in a provided base to a string. |
WordNumber struct.
The header file of WordNumber class.
Private interface of the class WordNumber.
WordNumber struct.
In the sence of memory this class is similar to node_ptr, i.e. no need to warry about memory, but class deinitialiser frees memory from all Word numbers. The class should be initialized and deinitialised after and before node_ptr, repspectively.
WordNumber type
WordNumberValue word_number_to_signed_c_value | ( | const WordNumber_ptr | self | ) | [related] |
boolean WordNumber_get_bit | ( | WordNumber_ptr | self, | |
int | n | |||
) | [related] |
returns the status (true or false) of a particular bit
the bit number should be in the range \[0, width-1\].
const char * WordNumber_get_parsed_string | ( | WordNumber_ptr | self | ) | [related] |
returns a string which was given to WordNumber_from_parsed_string constructor. Always returns NULL, this method is kept for backwards compability
boolean WordNumber_get_sign | ( | WordNumber_ptr | self | ) | [related] |
returns the status (true or false) of the sign bit
signed long long WordNumber_get_signed_value | ( | WordNumber_ptr | self | ) | [related] |
returns the value of a WordNumber, interpreted as a signed word
unsigned long long WordNumber_get_unsigned_value | ( | WordNumber_ptr | self | ) | [related] |
returns the value of a WordNumber, as unsigned word
int WordNumber_get_width | ( | WordNumber_ptr | self | ) | [related] |
returns the width of a WordNumber
char * WordNumber_to_based_string | ( | WordNumber_ptr | self, | |
int | base, | |||
boolean | isSigned | |||
) | [related] |
prints a Word constant in a provided base to a string.
This function is the same as WordNumber_based_print, except this function outputs to a string, not a stream. Only 2, 8, 10, 16 bits bases are allowed. If base is 10 then isSigned is taken into account, i.e. if it is true then the number is ouput as signed word, and as unsigned word otherwise. In case of any problem, NULL is returned.
Note: The returned string belongs to the funcion. Do not modify this string. Note: The next invocation of this function or WordNumber_to_string makes the previously returned string unusable
string_ptr WordNumber::parsedString |