![]() | InDesign SDK 20.5 |
#include <URI.h>
Public Types | |
| enum | Component { kScheme = 0, kAuthority, kPath, kQuery, kFragment } |
| typedef object_type | data_type |
Public Member Functions | |
| URI () | |
| URI (const std::string &uri) | |
| URI (const WideString &uri) | |
| URI (const URI &uri) | |
| virtual | ~URI () |
| URI & | operator= (const URI &rhs) |
| bool | operator== (const URI &rhs) const |
| bool | operator!= (const URI &rhs) const |
| bool | operator< (const URI &rhs) const |
| bool | SetURI (const std::string &uri) |
| std::string | GetURI () const |
| bool | SetURIW (const WideString &uri) |
| WideString | GetURIW () const |
| void | ClearURI () |
| bool | VerifyURI (Component *badComponent=nil) const |
| bool | HasComponent (Component component) const |
| void | SetComponent (Component component, const WideString &value) |
| WideString | GetComponent (Component component) const |
| void | RemoveComponent (Component component) |
| void | ReadWrite (IPMStream *s) |
InDesign class used to construct and parse a well formed Uniform Resource Identifier (URI). The class supports the generic URI syntax that consists of a hierarchical sequence of components referred to as the scheme, authority, path, query, and fragment. The scheme and path components are required, though the path may be empty (no characters).
When the authority component is present, the path must either be empty or begin with a slash ("/") character. When authority is not present, the path cannot begin with two slash characters ("//"). The current implementation does not distinguish an authority based on a registered name or server address, the optional port and user information. It is left up to the user to extract the aforementioned sub-components from the authority.
For more information on the syntax of a URI, see: {http://www.gbiv.com/protocols/uri/rfc/rfc3986.html}
| enum URI::Component |
| URI::URI | ( | ) |
Default constructor. Constructs an empty URI object.
| URI::URI | ( | const std::string & | uri | ) |
| URI::URI | ( | const WideString & | uri | ) |
Constructor. Constructs an URI object from the given URI WideString.
| uri | [IN] URI encoded WideString. |
| URI::URI | ( | const URI & | uri | ) |
| virtual |
Destructor. Destroys the URI object.
| void URI::ClearURI | ( | ) |
Clears the URI.
| WideString URI::GetComponent | ( | Component | component | ) | const |
Returns the value of the specified URI component.
| component | [IN] URI component to get. |
| std::string URI::GetURI | ( | ) | const |
| WideString URI::GetURIW | ( | ) | const |
Gets the URI as a WideString.
| bool URI::HasComponent | ( | Component | component | ) | const |
| bool URI::operator!= | ( | const URI & | rhs | ) | const |
| bool URI::operator< | ( | const URI & | rhs | ) | const |
| bool URI::operator== | ( | const URI & | rhs | ) | const |
| void URI::ReadWrite | ( | IPMStream * | s | ) |
Persistence-related method for saving or restoring the state of an URI object instance.
| iPMStream | [IN] Stream to read the instance data from or write the instance data to. |
| void URI::RemoveComponent | ( | Component | component | ) |
| void URI::SetComponent | ( | Component | component, |
| const WideString & | value | ||
| ) |
| bool URI::SetURI | ( | const std::string & | uri | ) |
| bool URI::SetURIW | ( | const WideString & | uri | ) |
Sets the URI from a WideString.
| uri | [IN] URI encoded WideString. |
| bool URI::VerifyURI | ( | Component * | badComponent = nil | ) | const |