![]() |
XMP Toolkit SDK
6.0.0
|
Version1 of the interface that represents an UTF8String. More...
#include <IUTF8String.h>
Public Member Functions | |
virtual spIUTF8String APICALL | append (const char *buf, sizet count)=0 |
Appends more content into the existing string object through a pointer to char buffer. More... | |
virtual spIUTF8String APICALL | append (const spcIUTF8String &src, sizet srcPos=0, sizet count=npos)=0 |
Appends the contents of another string into the existing string. More... | |
virtual spIUTF8String APICALL | assign (const char *buf, sizet count)=0 |
Overwrites new string content into the existing string object through a pointer to char buffer. More... | |
virtual spIUTF8String APICALL | assign (const spcIUTF8String &src, sizet srcPos=0, sizet count=npos)=0 |
Overwrites the contents with contents of another string. More... | |
virtual spIUTF8String APICALL | insert (sizet pos, const char *buf, sizet count)=0 |
Inserts additional characters into the string right before the character indicated by pos. More... | |
virtual spIUTF8String APICALL | insert (sizet pos, const spcIUTF8String &src, sizet srcPos=0, sizet count=npos)=0 |
Inserts additional characters into the string right before the character indicated by pos. More... | |
virtual spIUTF8String APICALL | erase (sizet pos=0, sizet count=npos)=0 |
Erases part of the string, reducing its length. More... | |
virtual void APICALL | resize (sizet n)=0 |
Resizes the string to the length of n characters. /param[in] n New string length, expressed in number of characters. More... | |
virtual spIUTF8String APICALL | replace (sizet pos, sizet count, const char *buf, sizet srcCount)=0 |
Replace portion of string. More... | |
virtual spIUTF8String APICALL | replace (sizet pos, sizet count, const spcIUTF8String &src, sizet srcPos=0, sizet srcCount=npos)=0 |
Replace portion of string. More... | |
virtual sizet APICALL | copy (char *buf, sizet len, sizet pos=0) const =0 |
Copy sequence of characters from string. More... | |
sizet | find (const char *buf, sizet pos=0) const |
Find content in string. More... | |
virtual sizet APICALL | find (const char *buf, sizet pos, sizet count) const =0 |
Find content in string. More... | |
virtual sizet APICALL | find (const spcIUTF8String &src, sizet pos=0, sizet count=npos) const =0 |
Find content in string. More... | |
sizet | rfind (const char *buf, sizet pos=npos) const |
Find last occurrence of content in string. More... | |
virtual sizet APICALL | rfind (const char *buf, sizet pos, sizet count) const =0 |
virtual sizet APICALL | rfind (const spcIUTF8String &src, sizet pos=npos, sizet count=npos) const =0 |
Find last occurrence of content in string. More... | |
![]() | |
virtual void APICALL | Acquire () const __NOTHROW__=0 |
Called by the clients of the object to indicate that he has acquired the shared ownership of the object. More... | |
virtual void APICALL | Release () const __NOTHROW__=0 |
Called by the clients of the object to indicate he has released his shared ownership of the object. If this being the last client than this function should call Destroy to delete and release the memory. More... | |
![]() | |
template<typename requestedInterface > | |
XMP_PRIVATE requestedInterface * | GetInterfacePointer () |
Get the raw pointer to an interface object implementing the requested version. More... | |
template<typename requestedInterface > | |
const XMP_PRIVATE requestedInterface * | GetInterfacePointer () const |
Get the raw pointer to a const interface object implementing the requested version. More... | |
int32 | compare (const char *buf) const |
Compare strings. More... | |
int32 | compare (sizet pos, sizet len, const char *buf) const |
Compare strings. More... | |
virtual int32 APICALL | compare (sizet pos, sizet len, const char *buf, sizet count) const =0 |
Compare strings. More... | |
int32 | compare (const spcIUTF8String &str) const |
Compare strings. More... | |
virtual int32 APICALL | compare (sizet pos, sizet len, const spcIUTF8String &str, sizet strPos=0, sizet strLen=npos) const =0 |
Compare strings. More... | |
virtual spIUTF8String APICALL | substr (sizet pos=0, sizet count=npos) const =0 |
Returns a new string object which contains a sub string of the actual string object. More... | |
virtual bool APICALL | empty () const =0 |
Indicates whether the string object is empty or not. More... | |
virtual const char *APICALL | c_str () const __NOTHROW__=0 |
Provides access to the actual location where contents of string are stored. More... | |
virtual void APICALL | clear () __NOTHROW__=0 |
Clears the contents of the string object. More... | |
virtual sizet APICALL | size () const __NOTHROW__=0 |
Indicates the number of bytes used by the contents of the string object. More... | |
static XMP_PRIVATE spIUTF8String | CreateUTF8String (pIObjectFactory objFactory) |
Creates an empty IUTF8String object. More... | |
static XMP_PRIVATE spIUTF8String | CreateUTF8String (pIObjectFactory objFactory, const char *buf, sizet count) |
Creates an IUTF8String object whose initial contents are copied from a char buffer. More... | |
virtual | ~IUTF8String_v1 () __NOTHROW__ |
Additional Inherited Members | |
![]() | |
virtual | ~ISharedObject () __NOTHROW__=0 |
REQ_FRIEND_CLASS_DECLARATION () | |
![]() | |
virtual | ~IVersionable () |
REQ_FRIEND_CLASS_DECLARATION () | |
Version1 of the interface that represents an UTF8String.
Provides all the functions to access properties of the string object, appends or assigns content to the existing string objects and clones existing string objects.
Definition at line 25 of file IUTF8String.h.
|
inlineprotectedvirtual |
|
pure virtual |
Appends more content into the existing string object through a pointer to char buffer.
[in] | buf | pointer to a constant char buffer containing new content. It can be null terminated or not. NULL pointer will be treated as empty string. |
[in] | count | A value of #AdobeXMPCommon::sizet indicating the length in case buf is not null terminated. In case buf is null terminated it can be set to npos. |
|
pure virtual |
Appends the contents of another string into the existing string.
[in] | src | Shared pointer to const #AdobeXMPCommon::IUTF8String whose contents will be appended to existing content in the object. Invalid shared pointer will be treated as empty string. |
[in] | srcPos | A value of #AdobeXMPCommon::sizet indicating the position of the first character in src that is inserted into the object as a substring. |
[in] | count | A value of #AdobeXMPCommon::sizet indicating the length of the substring to be copied (if the string is shorter, as many characters as possible are copied). A value of npos indicates all characters until the end of src. |
|
pure virtual |
Overwrites new string content into the existing string object through a pointer to char buffer.
[in] | buf | pointer to a constant char buffer containing new content. It can be null terminated or not. NULL pointer will be treated as empty string. |
[in] | count | A value of #AdobeXMPCommon::sizet indicating the length in case buf is not null terminated. In case buf is null terminated it can be set to npos. |
|
pure virtual |
Overwrites the contents with contents of another string.
[in] | src | shared pointer to const #AdobeXMPCommon::IUTF8String whose contents will overwrite existing content in the object. Invalid shared pointer will be treated as empty string. |
[in] | srcPos | A value of #AdobeXMPCommon::sizet indicating the position of the first character in src that is inserted into the object as a substring. |
[in] | count | A value of #AdobeXMPCommon::sizet indicating the length of the substring to be copied. A value of npos indicates all characters until the end of src. If this is greater than the available characters in the substring then copying is limited to the number of available characters. |
|
pure virtual |
Provides access to the actual location where contents of string are stored.
|
pure virtual |
Clears the contents of the string object.
|
inline |
Compare strings.
Compares the value of the string object (or a substring) to the sequence of characters specified by its arguments.
[in] | buf | pointer to a constant char buffer containing content to be compared. It can be null terminated or not. NULL pointer will be treated as empty string. |
value | relation between compared string and comparing string |
---|---|
0 | They compare equal |
<0 | Either the value of the first character that does not match is lower in the compared string, or all compared characters match but the compared string is shorter. |
>0 | Either the value of the first character that does not match is greater in the compared string, or all compared characters match but the compared string is longer. |
Definition at line 285 of file IUTF8String.h.
References AdobeXMPCommon::npos().
|
inline |
Compare strings.
Compares the value of the string object (or a substring) to the contents of an string or substring object specified by its arguments.
[in] | str | shared pointer to const #AdobeXMPCommon::IUTF8String containing content to be compared. Invalid shared pointer will be treated as empty string. |
value | relation between compared string and comparing string |
---|---|
0 | They compare equal |
<0 | Either the value of the first character that does not match is lower in the compared string, or all compared characters match but the compared string is shorter. |
>0 | Either the value of the first character that does not match is greater in the compared string, or all compared characters match but the compared string is longer. |
Definition at line 349 of file IUTF8String.h.
|
inline |
Compare strings.
Compares the value of the string object (or a substring) to the sequence of characters specified by its arguments.
[in] | buf | pointer to a constant char buffer containing content to be compared. It can be null terminated or not. NULL pointer will be treated as empty string. |
[in] | pos | Position of the first character in the compared string. If this is greater than the string length, it is treated as empty string. |
[in] | len | Length of compared string (if the string is shorter, as many characters as possible). A value of npos indicates all characters until the end of the string. |
value | relation between compared string and comparing string |
---|---|
0 | They compare equal |
<0 | Either the value of the first character that does not match is lower in the compared string, or all compared characters match but the compared string is shorter. |
>0 | Either the value of the first character that does not match is greater in the compared string, or all compared characters match but the compared string is longer. |
Definition at line 307 of file IUTF8String.h.
References AdobeXMPCommon::npos().
|
pure virtual |
Compare strings.
Compares the value of the string object (or a substring) to the sequence of characters specified by its arguments.
[in] | buf | pointer to a constant char buffer containing content to be compared. It can be null terminated or not. NULL pointer will be treated as empty string. |
[in] | pos | Position of the first character in the compared string. If this is greater than the string length, it is treated as empty string. |
[in] | len | Length of compared string (if the string is shorter, as many characters as possible). A value of npos indicates all characters until the end of the string. |
[in] | count | Number of characters to compare. |
value | relation between compared string and comparing string |
---|---|
0 | They compare equal |
<0 | Either the value of the first character that does not match is lower in the compared string, or all compared characters match but the compared string is shorter. |
>0 | Either the value of the first character that does not match is greater in the compared string, or all compared characters match but the compared string is longer. |
|
pure virtual |
Compare strings.
Compares the value of the string object (or a substring) to the contents of an string or substring object specified by its arguments.
[in] | pos | Position of the first character in the compared string. |
[in] | len | Length of compared string (if the string is shorter, as many characters as possible). A value of npos indicates all characters until the end of the string. |
[in] | str | shared pointer to const #AdobeXMPCommon::IUTF8String containing content to be compared. Invalid shared pointer will be treated as empty string. |
[in] | strPos | Position of the first character in the comparing string. |
[in] | strLen | Length of comparing string (if the string is shorter, as many characters as possible). |
value | relation between compared string and comparing string |
---|---|
0 | They compare equal |
<0 | Either the value of the first character that does not match is lower in the compared string, or all compared characters match but the compared string is shorter. |
>0 | Either the value of the first character that does not match is greater in the compared string, or all compared characters match but the compared string is longer. |
|
pure virtual |
Copy sequence of characters from string.
Copies a substring of the current value of the string object into the array. This substring contains the len characters that start at position pos.
[in,out] | buf | Pointer to an array of characters. The array shall contain enough storage for the copied characters. |
[in] | len | Number of characters to copy (if the string is shorter, as many characters as possible are copied). |
[in] | pos | Position of the first character to be copied. |
|
static |
Creates an empty IUTF8String object.
[in] | objFactory | A pointer to #AdobeXMPCommon::IObjectFactory object. |
|
static |
Creates an IUTF8String object whose initial contents are copied from a char buffer.
[in] | objFactory | A pointer to #AdobeXMPCommon::IObjectFactory object. |
[in] | buf | pointer to a constant char buffer containing content. It can be null terminated or not. NULL pointer will be treated as empty string. |
[in] | count | A value of #AdobeXMPCommon::sizet indicating the length in case buf is not null terminated. In case buf is null terminated it can be set to npos. |
|
pure virtual |
Indicates whether the string object is empty or not.
|
pure virtual |
Erases part of the string, reducing its length.
[in] | pos | Position of the first character to be erased. If this is greater than the string length, nothing is erased. |
[in] | count | Number of characters to erase (if the string is shorter, as many characters as possible are erased). A value of npos indicates all characters until the end of the string. |
|
pure virtual |
Find content in string.
Searches the string for the first occurrence of the sequence specified by its arguments. When pos is specified, the search only includes characters at or after position pos, ignoring any possible occurrences that include characters before pos.
[in] | buf | pointer to a constant char buffer containing content to be matched. It can be null terminated or not. NULL pointer will be treated as empty string. |
[in] | pos | Position of the first character in the string to be considered in the search. If this is greater than the string length, the function never finds matches. |
[in] | count | Length of sequence of characters to match. |
Find content in string.
Searches the string for the first occurrence of the sequence specified by its arguments. When pos is specified, the search only includes characters at or after position pos, ignoring any possible occurrences that include characters before pos.
[in] | buf | pointer to a constant char buffer containing content to be matched. It can be null terminated or not. NULL pointer will be treated as empty string. |
[in] | pos | Position of the first character in the string to be considered in the search. If this is greater than the string length, the function never finds matches. |
Definition at line 196 of file IUTF8String.h.
References AdobeXMPCommon::npos().
|
pure virtual |
Find content in string.
Searches the string for the first occurrence of the sequence specified by its arguments. When pos is specified, the search only includes characters at or after position pos, ignoring any possible occurrences that include characters before pos.
[in] | src | shared pointer to const #AdobeXMPCommon::IUTF8String containing content to be matched. Invalid shared pointer will be treated as empty string. |
[in] | pos | Position of the first character in the string to be considered in the search. If this is greater than the string length, the function never finds matches. |
[in] | count | Length of sequence of characters to match. |
|
pure virtual |
Inserts additional characters into the string right before the character indicated by pos.
[in] | pos | Insertion point: The new contents are inserted before the character at position pos. |
[in] | buf | pointer to a constant char buffer containing new content. It can be null terminated or not. NULL pointer will be treated as empty string. |
[in] | count | A value of #AdobeXMPCommon::sizet indicating the length in case buf is not null terminated. In case buf is null terminated it can be set to npos. |
|
pure virtual |
Inserts additional characters into the string right before the character indicated by pos.
[in] | pos | Insertion point: The new contents are inserted before the character at position pos. |
[in] | src | shared pointer to const #AdobeXMPCommon::IUTF8String whose contents will be copied and pushed into the object. Invalid shared pointer will be treated as empty string. |
[in] | srcPos | A value of #AdobeXMPCommon::sizet indicating the position of the first character in src that is inserted into the object as a substring. |
[in] | count | A value of #AdobeXMPCommon::sizet indicating the length of the substring to be copied (if the string is shorter, as many characters as possible are copied). A value of npos indicates all characters until the end of src. If this is greater than the available characters in the substring then copying is limited to the number of available characters. |
|
pure virtual |
Replace portion of string.
[in] | pos | Position of the first character to be replaced. |
[in] | count | Number of characters to replace (if the string is shorter, as many characters as possible are replaced). A value of npos indicates all characters until the end of the string. |
[in] | buf | pointer to a constant char buffer containing new content. It can be null terminated or not. NULL pointer will be treated as empty string. |
[in] | srcCount | A value of #AdobeXMPCommon::sizet indicating the length in case buf is not null terminated. In case buf is null terminated it can be set to npos. |
|
pure virtual |
Replace portion of string.
[in] | pos | Position of the first character to be replaced. |
[in] | count | Number of characters to replace (if the string is shorter, as many characters as possible are replaced). A value of npos indicates all characters until the end of the string. |
[in] | src | Shared pointer to const #AdobeXMPCommon::IUTF8String whose contents will be copied and pushed into the object. Invalid shared pointer will be treated as empty string. |
[in] | srcPos | Position of the first character in str that is copied to the object as replacement. |
[in] | srcCount | Length of the substring to be copied (if the string is shorter, as many characters as possible are copied). A value of npos indicates all characters until the end of str. |
|
pure virtual |
Resizes the string to the length of n characters. /param[in] n New string length, expressed in number of characters.
|
pure virtual |
Find last occurrence of content in string.
Searches the string for the last occurrence of the sequence specified by its arguments. When pos is specified, the search only includes sequences of characters that begin at or before position pos, ignoring any possible match beginning after pos.
[in] | buf | pointer to a constant char buffer containing content to be matched. It can be null terminated or not. NULL pointer will be treated as empty string. |
[in] | pos | Position of the last character in the string to be considered as the beginning of a match. Any value greater or equal than the string length (including npos) means that the entire string is searched. |
Definition at line 245 of file IUTF8String.h.
References AdobeXMPCommon::npos().
|
pure virtual |
Find last occurrence of content in string.
Searches the string for the last occurrence of the sequence specified by its arguments. When pos is specified, the search only includes sequences of characters that begin at or before position pos, ignoring any possible match beginning after pos.
[in] | src | shared pointer to const #AdobeXMPCommon::IUTF8String containing content to be matched. Invalid shared pointer will be treated as empty string. |
[in] | pos | Position of the last character in the string to be considered as the beginning of a match. Any value greater or equal than the string length (including npos) means that the entire string is searched. |
[in] | count | Length of sequence of characters to match. |
|
pure virtual |
Indicates the number of bytes used by the contents of the string object.
|
pure virtual |
Returns a new string object which contains a sub string of the actual string object.
[in] | pos | Position of the first character to be copied. If this is greater than the string length, then nothing is copied. |
[in] | count | Number of characters to copy (if the string is shorter, as many characters as possible are copied). |