![]() | InDesign SDK 20.5 |
#include <LinkQuery.h>
Public Member Functions | |
| LinkQuery () | |
| LinkQuery (const LinkQuery &query) | |
| virtual | ~LinkQuery () |
| LinkQuery & | operator= (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 |
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.
| LinkQuery::LinkQuery | ( | ) |
Default constructor. Constructs an empty LinkQuery object.
| LinkQuery::LinkQuery | ( | const LinkQuery & | query | ) |
| virtual |
Destructor. Destroys the LinkQuery object.
| void LinkQuery::Clear | ( | ) |
Clears the query.
| bool LinkQuery::IsEmpty | ( | ) | const |
Determines if the query is empty.
| bool LinkQuery::operator!= | ( | const LinkQuery & | rhs | ) | const |
| bool LinkQuery::operator== | ( | const LinkQuery & | rhs | ) | const |
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| bShowInUI | [IN] Boolean denoting whether the link is displayed in the Links UI. |