![]() | InDesign SDK 20.5 |
#include <LinkResourceQuery.h>
Public Member Functions | |
| LinkResourceQuery () | |
| LinkResourceQuery (const LinkResourceQuery &query) | |
| virtual | ~LinkResourceQuery () |
| LinkResourceQuery & | operator= (const LinkResourceQuery &rhs) |
| bool | operator== (const LinkResourceQuery &rhs) const |
| bool | operator!= (const LinkResourceQuery &rhs) const |
| void | SetURI (const URI &uri) |
| void | SetScheme (const WideString &scheme) |
| void | SetState (ILinkResource::ResourceState state) |
| void | SetStoreState (ILinkResource::ResourceStoreState storeState) |
| void | SetAccessMode (ILinkResource::AccessMode mode) |
| bool | IsEmpty () const |
| void | Clear () |
Friends | |
| class | LinkManager |
| class | ScrapLinkManager |
InDesign class used to construct a link resource query.
All the methods may be called multiple times to OR the values. Calling different methods will create an AND condition between them.
For example the following code segment: \ LinkResourceQuery query; \ query.SetScheme(WideString("file")); \ query.SetState(ILinkResource::kMissing); \ query.SetState(ILinkResource::kUnknown); \
Results in the following query: \ (Scheme = "file") AND (State = kMissing OR State = kUnknown).
After the query has been constructed, call ILinkManager::QueryResources() to process the query and get the set of ILinkResource UIDs that satisfy the query. An empty query will return every ILinkResource UID.
| LinkResourceQuery::LinkResourceQuery | ( | ) |
Default constructor. Constructs an empty LinkResourceQuery object.
| LinkResourceQuery::LinkResourceQuery | ( | const LinkResourceQuery & | query | ) |
Copy constructor. Constructs an LinkResourceQuery object that is a copy of the given LinkResourceQuery.
| query | [IN] LinkResourceQuery object to copy. |
| virtual |
Destructor. Destroys the LinkResourceQuery object.
| void LinkResourceQuery::Clear | ( | ) |
Clears the query.
| bool LinkResourceQuery::IsEmpty | ( | ) | const |
Determines if the query is empty.
| bool LinkResourceQuery::operator!= | ( | const LinkResourceQuery & | rhs | ) | const |
Non-equality operator. Test whether this LinkResourceQuery is not equal to the given LinkResourceQuery.
| rhs | [IN] LinkResourceQuery to test for non-equality against this LinkResourceQuery. |
| LinkResourceQuery& LinkResourceQuery::operator= | ( | const LinkResourceQuery & | rhs | ) |
Assignment operator. Assigns the given LinkResourceQuery to this LinkResourceQuery.
| rhs | [IN] LinkResourceQuery to assign to this LinkResourceQuery. |
| bool LinkResourceQuery::operator== | ( | const LinkResourceQuery & | rhs | ) | const |
Equality operator. Test whether this LinkResourceQuery is equal to the given LinkResourceQuery.
| rhs | [IN] LinkResourceQuery to test for equality against this LinkResourceQuery. |
| void LinkResourceQuery::SetAccessMode | ( | ILinkResource::AccessMode | mode | ) |
Sets the access mode of a link resource to query for. \ For example, calling SetAccessMode(ILinkResource::kRead) will result in a query that returns the UIDs of all the readable link resources. \ Multiple calls results in an OR conditional in the query. \ Note: Queries on access modes alone cannot be performed in an efficient manner, and therefore should not performed without careful consideration.
| mode | [IN] Access mode. |
| void LinkResourceQuery::SetScheme | ( | const WideString & | scheme | ) |
Sets the scheme of a link resource to query for. Multiple calls results in an OR conditional in the query.
| scheme | [IN] Scheme of a link resource. |
| void LinkResourceQuery::SetState | ( | ILinkResource::ResourceState | state | ) |
Sets the state of a link resource to query for. \ Multiple calls results in an OR conditional in the query.
| state | [IN] State of a link resource. |
| void LinkResourceQuery::SetStoreState | ( | ILinkResource::ResourceStoreState | storeState | ) |
Sets the store state of a link resource to query for. \ Multiple calls results in an OR conditional in the query.
| storeState | [IN] Store state of a link resource. |