InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
LinkResourceQuery Class Reference

#include <LinkResourceQuery.h>

Public Member Functions

 LinkResourceQuery ()
 
 LinkResourceQuery (const LinkResourceQuery &query)
 
virtual ~LinkResourceQuery ()
 
LinkResourceQueryoperator= (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
 

Detailed Description

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.

See Also
ILinkManager

Constructor & Destructor Documentation

LinkResourceQuery::LinkResourceQuery ()

Default constructor. Constructs an empty LinkResourceQuery object.

LinkResourceQuery::LinkResourceQuery (const LinkResourceQueryquery)

Copy constructor. Constructs an LinkResourceQuery object that is a copy of the given LinkResourceQuery.

Parameters
query[IN] LinkResourceQuery object to copy.
virtual LinkResourceQuery::~LinkResourceQuery ()
virtual

Destructor. Destroys the LinkResourceQuery object.

Member Function Documentation

void LinkResourceQuery::Clear ()

Clears the query.

bool LinkResourceQuery::IsEmpty () const

Determines if the query is empty.

Returns
True if the query is empty, else false.
bool LinkResourceQuery::operator!= (const LinkResourceQueryrhs) const

Non-equality operator. Test whether this LinkResourceQuery is not equal to the given LinkResourceQuery.

Parameters
rhs[IN] LinkResourceQuery to test for non-equality against this LinkResourceQuery.
Returns
True if this LinkResourceQuery is not equal to the given LinkResourceQuery, else false.
LinkResourceQuery& LinkResourceQuery::operator= (const LinkResourceQueryrhs)

Assignment operator. Assigns the given LinkResourceQuery to this LinkResourceQuery.

Parameters
rhs[IN] LinkResourceQuery to assign to this LinkResourceQuery.
Returns
Reference to this LinkResourceQuery.
bool LinkResourceQuery::operator== (const LinkResourceQueryrhs) const

Equality operator. Test whether this LinkResourceQuery is equal to the given LinkResourceQuery.

Parameters
rhs[IN] LinkResourceQuery to test for equality against this LinkResourceQuery.
Returns
True if this LinkResourceQuery is equal to the given LinkResourceQuery, else false.
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.

Parameters
mode[IN] Access mode.
void LinkResourceQuery::SetScheme (const WideStringscheme)

Sets the scheme of a link resource to query for. Multiple calls results in an OR conditional in the query.

Parameters
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.

Parameters
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.

Parameters
storeState[IN] Store state of a link resource.
void LinkResourceQuery::SetURI (const URIuri)

Sets the URI of a link resource to query for. \ Multiple calls results in an OR conditional in the query.

Parameters
uri[IN] URI of a link resource.