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

#include <LinkQuery.h>

Public Member Functions

 LinkQuery ()
 
 LinkQuery (const LinkQuery &query)
 
virtual ~LinkQuery ()
 
LinkQueryoperator= (const LinkQuery &rhs)
 
bool operator== (const LinkQuery &rhs) const
 
bool operator!= (const LinkQuery &rhs) const
 
void SetLinkType (ILink::LinkType type)
 
void SetChild (UID child)
 
void SetParent (UID parent)
 
void SetResource (UID resourceUID)
 
void SetResourceModState (ILink::ResourceModificationState modState)
 
void SetObject (UID objectUID)
 
void SetObjectModState (ILink::ObjectModificationState modState)
 
void SetExportPolicy (ILink::ExportPolicy policy)
 
void SetImportPolicy (ILink::ImportPolicy policy)
 
void SetShowInUI (bool16 bShowInUI)
 
bool IsEmpty () const
 
void Clear ()
 

Friends

class LinkManager
 
class ScrapLinkManager
 

Detailed Description

InDesign class used to construct a link query.

The methods (with exceptions noted) 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: \ LinkQuery query; \ query.SetLinkType(ILink::kImport); \ query.SetLinkType(ILink::kBidirectional); \ query.SetResourceModState(ILink::kResourceModified); \

Results in the following query: \ (LinkType = kImport OR LinkType = kBidirectional) AND (ResourceModState = kResourceModified).

After the query has been constructed, call ILinkManager::QueryLinks() to process the query and get the set of ILink UIDs that satisfy the query. An empty query will return every ILink UID.

See Also
ILinkManager

Constructor & Destructor Documentation

LinkQuery::LinkQuery ()

Default constructor. Constructs an empty LinkQuery object.

LinkQuery::LinkQuery (const LinkQueryquery)

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

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

Destructor. Destroys the LinkQuery object.

Member Function Documentation

void LinkQuery::Clear ()

Clears the query.

bool LinkQuery::IsEmpty () const

Determines if the query is empty.

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

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

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

Assignment operator. Assigns the given LinkQuery to this LinkQuery.

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

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

Parameters
rhs[IN] LinkQuery to test for equality against this LinkQuery.
Returns
True if this LinkQuery is equal to the given LinkQuery, else false.
void LinkQuery::SetChild (UID child)

Sets the UID of a child link whose parents to query for. \ Multiple calls results in an OR conditional in the query.

Parameters
parent[IN] UID of a child link.
void LinkQuery::SetExportPolicy (ILink::ExportPolicy policy)

Sets the update export policy of a link to query for. \ Multiple calls results in an OR conditional in the query.

Parameters
policy[IN] Link update export policy.
void LinkQuery::SetImportPolicy (ILink::ImportPolicy policy)

Sets the update import policy of a link to query for. \ Multiple calls results in an OR conditional in the query.

Parameters
policy[IN] Link update import policy.
void LinkQuery::SetLinkType (ILink::LinkType type)

Sets the type of link to query for. Multiple calls results in an OR conditional in the query.

Parameters
type[IN] Type of a link.
void LinkQuery::SetObject (UID objectUID)

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

Parameters
objectUID[IN] UID of a link object.
void LinkQuery::SetObjectModState (ILink::ObjectModificationState modState)

Sets the modification state of a link object to query for. \ Multiple calls results in an OR conditional in the query.

Parameters
modState[IN] Modification state of a linked object.
void LinkQuery::SetParent (UID parent)

Sets the UID of a parent link whose children to query for. \ Multiple calls results in an OR conditional in the query.

Parameters
parent[IN] UID of a parent link.
void LinkQuery::SetResource (UID resourceUID)

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

Parameters
resourceUID[IN] UID of a link resource.
void LinkQuery::SetResourceModState (ILink::ResourceModificationState modState)

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

Parameters
modState[IN] Modification state of a linked resource.
void LinkQuery::SetShowInUI (bool16 bShowInUI)

Sets the show link in Link UI flag to query for. \ Only one flag can be specified: kTrue or kFalse. Multiple calls do not result in an OR conditional in the query.

Parameters
bShowInUI[IN] Boolean denoting whether the link is displayed in the Links UI.