Software and Services, Portable Libraries
2019.Mar.01
A library for managing digital certificates
|
This class represents any iCalendar TEXT value type. More...
#include </home/doug/src/SoftwareAndServices/libSaSiCalendar/text.hpp>
Public Types | |
enum | quote_errors { NO_END_QUOTE_e = 1, NO_DATA_PROVIDED_e, UNKNOWN_BACKSLASH_ESCAPE_e, NO_TERM_FOUND_e } |
These are C++ objects that can be thrown as errors. More... | |
Public Member Functions | |
text () | |
text Constructor - no data. More... | |
text (const text *aValue) | |
text Constructor - copy constructor. More... | |
text (const char *aString, size_t Length=0) | |
text Constructor More... | |
text (String *aString) | |
text Constructor More... | |
virtual | ~text () |
Destructor. More... | |
virtual InstanceCount_t | decInstance () const |
Decrement the instance. More... | |
const char * | get () const |
Get the (char*) value. More... | |
const value * | getData () const |
Get the pointer to the data being stored. More... | |
virtual InstanceCount_t | getInstance () const |
Tokens_t | getType () const |
Get the type of data being stored. More... | |
const char * | getXValueType () const |
Get the type of data being stored. More... | |
virtual InstanceCount_t | incInstance () const |
Increment the instance. More... | |
void | operator delete (void *data) |
This class uses instance counting, this entry point overloads the default delete() operator in order to correctly track the instance. More... | |
bool | operator< (const text &Other) |
text less than compare operator. More... | |
bool | operator<= (const text &Other) |
text less than or equal to compare operator. More... | |
text & | operator= (const text &Other) |
Copy a text object by incrementing its instance pointer. More... | |
bool | operator== (const text &Other) |
text equal compare operator. More... | |
bool | operator> (const text &Other) |
text greater than compare operator. More... | |
bool | operator>= (const text &Other) |
text greater than or equal to compare operator. More... | |
bool | parse (Parse &in, component *errors) |
Parse the data into this object. More... | |
bool | parse (const char *in, component *errors) |
Parse the data into this object. More... | |
void | setData (void *DataPtr) |
Set the data to the data being stored. More... | |
void | setType (Tokens_t Token) |
Set the type of data being stored. More... | |
void | setXValueType (const char *xValType) |
Set the type of data being stored - non-standard types only. More... | |
virtual bool | sprint (String *Results) const =0 |
Print the object in RFC-iCalendar format. More... | |
virtual bool | sprint (String *Results) const |
Print the object in RFC-iCalendar format. More... | |
Static Public Member Functions | |
static char * | addQuotes (const char *text) |
Add quotes to the value. More... | |
static char * | escape (const char *text) |
Escape a value and return an RFC-iCalendar value encoded. More... | |
static char * | removeQuotes (const char *text) |
Remove quotes from a user supplied value so that the raw data can be stored. More... | |
static bool | sprintTokensAsText (String *Results, Tokens_t token) |
Called by text2token() to get the token name as a String. More... | |
static char * | unescape (const char *text, const char *term) |
Un-escape a value and return what a user originally entered. More... | |
Static Public Attributes | |
static const char ** | tokenStrings |
A list of strings for the names of tokens. More... | |
These are C++ objects that can be thrown as errors.
Definition at line 204 of file BaseValueType.hpp.
SoftwareAndServices::Library::iCalendar::text::text | ( | ) |
text Constructor - no data.
SoftwareAndServices::Library::iCalendar::text::text | ( | const text * | aValue | ) |
text Constructor - copy constructor.
aValue | Initialize the value to str. |
SoftwareAndServices::Library::iCalendar::text::text | ( | const char * | aString, |
size_t | Length = 0 |
||
) |
text Constructor
aString | Initialize the value to str. |
Length | If Length is greater then zero, only take Length characters as the value to use to initialize this object. |
SoftwareAndServices::Library::iCalendar::text::text | ( | String * | aString | ) |
text Constructor
aString | Initialize the value to str. |
|
virtual |
Destructor.
|
staticinherited |
Add quotes to the value.
Caller MUST free results.
text | The text to be de-quoted. |
|
inlinevirtualinherited |
Decrement the instance.
Reimplemented in SoftwareAndServices::Library::iCalendar::date_time.
Definition at line 129 of file instance.hpp.
|
staticinherited |
Escape a value and return an RFC-iCalendar value encoded.
Caller MUST free results.
text | the text to escape. |
const char* SoftwareAndServices::Library::iCalendar::text::get | ( | ) | const |
Get the (char*) value.
Caller MUST StringCache::remove it when done.
|
inherited |
Get the pointer to the data being stored.
|
inlinevirtualinherited |
Definition at line 118 of file instance.hpp.
|
inherited |
Get the type of data being stored.
If it returns Unknown_t, call getXType()
|
inherited |
Get the type of data being stored.
If it returns NULL, call getType()
|
inlinevirtualinherited |
Increment the instance.
Reimplemented in SoftwareAndServices::Library::iCalendar::date_time.
Definition at line 109 of file instance.hpp.
|
inherited |
This class uses instance counting, this entry point overloads the default delete() operator in order to correctly track the instance.
bool SoftwareAndServices::Library::iCalendar::text::operator< | ( | const text & | Other | ) |
text less than compare operator.
Does a string compare.
Other | The other text object to compare to. |
bool SoftwareAndServices::Library::iCalendar::text::operator<= | ( | const text & | Other | ) |
text less than or equal to compare operator.
Does a string compare.
Other | The other text object to compare to. |
Copy a text object by incrementing its instance pointer.
Other | The other text object to get a ref from. |
bool SoftwareAndServices::Library::iCalendar::text::operator== | ( | const text & | Other | ) |
text equal compare operator.
Does a string compare.
Other | The other text object to compare to. |
bool SoftwareAndServices::Library::iCalendar::text::operator> | ( | const text & | Other | ) |
text greater than compare operator.
Does a string compare.
Other | The other text object to compare to. |
bool SoftwareAndServices::Library::iCalendar::text::operator>= | ( | const text & | Other | ) |
text greater than or equal to compare operator.
Does a string compare.
Other | The other text object to compare to. |
bool SoftwareAndServices::Library::iCalendar::text::parse | ( | Parse & | in, |
component * | errors | ||
) |
Parse the data into this object.
in | An initialized Parse() object. |
errors | An object that will contain any errors in a RFC-iCalendar way. |
bool SoftwareAndServices::Library::iCalendar::text::parse | ( | const char * | in, |
component * | errors | ||
) |
Parse the data into this object.
in | An string to be used as the value for this object. |
errors | An object that will contain any errors in a RFC-iCalendar way. |
|
staticinherited |
Remove quotes from a user supplied value so that the raw data can be stored.
Caller MUST free results.
text | The text to be de-quoted. No harm if it does not already contain quotes. |
|
inherited |
Set the data to the data being stored.
DataPtr | Pointer to the data. |
|
inherited |
Set the type of data being stored.
If the type is not a predefined one, call setXValueType()
Token | The type of data being stored. |
|
inherited |
Set the type of data being stored - non-standard types only.
If the type is a predefined one, call setValueType()
xValType | The type of data being stored as a string. |
|
pure virtualinherited |
Print the object in RFC-iCalendar format.
Results | Append the results to Results. |
Implemented in SoftwareAndServices::Library::iCalendar::date_time, SoftwareAndServices::Library::iCalendar::dur_value, SoftwareAndServices::Library::iCalendar::recur, SoftwareAndServices::Library::iCalendar::upn_value, SoftwareAndServices::Library::iCalendar::cal_address, SoftwareAndServices::Library::iCalendar::binary, SoftwareAndServices::Library::iCalendar::time, SoftwareAndServices::Library::iCalendar::date, SoftwareAndServices::Library::iCalendar::uri, SoftwareAndServices::Library::iCalendar::period, SoftwareAndServices::Library::iCalendar::upn_filter, SoftwareAndServices::Library::iCalendar::boolean, SoftwareAndServices::Library::iCalendar::cal_query, SoftwareAndServices::Library::iCalendar::integer, SoftwareAndServices::Library::iCalendar::utc_offset, and SoftwareAndServices::Library::iCalendar::float_value.
|
virtual |
Print the object in RFC-iCalendar format.
Results | Append the results to Results. |
|
staticinherited |
Called by text2token() to get the token name as a String.
Results | The token name as a String. |
token | The token to convert to a string. |
|
staticinherited |
Un-escape a value and return what a user originally entered.
Caller MUST delete results when done. The string would have been encoded as an RFC-iCalendar value encoding.
text | the text to un-escape. |
term | A string to be used as the data separator. This value is passed to strpbrk(). |
|
staticinherited |
A list of strings for the names of tokens.
The token value used as an offset into this array is the name of the token as a string.
The strings "X_COMP", "X_PROP", and "XPARAM" ARE included. Strings matching X_COMP, X_PROP, and XPARAM values are not included.
Definition at line 144 of file BaseValueType.hpp.