InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPreflightProfileRules Class Referenceabstract

#include <IPreflightProfileRules.h>

Inheritance diagram for IPreflightProfileRules:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPREFLIGHTPROFILERULES }
 

Public Member Functions

virtual int32 GetRuleCount () const =0
 
virtual IPreflightRuleInfoQueryNthRule (int32 n) const =0
 
virtual IPreflightRuleInfoQueryRuleByID (const PreflightRuleID &ruleID) const =0
 
virtual int32 Location (const IPreflightRuleInfo *iRule) const =0
 
virtual int32 Location (const PreflightRuleID &ruleID) const =0
 
virtual void AddRule (IPreflightRuleInfo *iRule)=0
 
virtual void RemoveNthRule (uint32 n, bool deleteIt=kTrue)=0
 
virtual void RemoveAllRules (bool deleteThem=kTrue)=0
 
virtual void CopyFrom (const IPreflightProfileRules *iSrc)=0
 
virtual bool IsEqual (const IPreflightProfileRules *iOther) const =0
 
virtual void UpdateAllRulesData ()=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Maintains a list of rules in a profile. Profiles can be in a database or not, so this interface maintains an array of refcounted IPreflightRuleInfo interfaces if it's an in-memory profile, or a UIDList of rule bosses if it's in a database.

Member Function Documentation

virtual void IPreflightProfileRules::AddRule (IPreflightRuleInfoiRule)
pure virtual

Add a new rule; typically called with a rule created via a rule service. The rule must be in the same database as the profile (or no database if the profile is not in a database).

Parameters
iRuleThe rule you want to add. This interface is refcounted for in-memory profiles; it is NOT refcounted for database profiles, but the UID of the boss is added to the UIDList of this interface.
virtual void IPreflightProfileRules::CopyFrom (const IPreflightProfileRulesiSrc)
pure virtual

Copies the rules from another list. This copies each rule and adds it to the list. Prior to this all existing rules are deleted (by RemoveAllRules(kTrue)). Note that this works for all combinations of in-memory and in-database profiles.

Parameters
iSrcThe rules you want to copy from.
virtual int32 IPreflightProfileRules::GetRuleCount () const
pure virtual

Get the number of rules in the list.

Returns
The number of rules in the list.
virtual bool IPreflightProfileRules::IsEqual (const IPreflightProfileRulesiOther) const
pure virtual

Does a deep compare with another profile to determine equivalence. Equivalence is defined as having all the same rules with all the same parameters, although not necessarily in the same order.

Parameters
iOtherIN The rules to compare against.
Returns
kTrue if they're the same; kFalse otherwsise.
virtual int32 IPreflightProfileRules::Location (const IPreflightRuleInfoiRule) const
pure virtual

Get the location of a rule in the list (if it is in the list).

Parameters
iRuleThe rule you want to find.
Returns
The index of the rule in the list, or -1 if it's not in the list.
virtual int32 IPreflightProfileRules::Location (const PreflightRuleIDruleID) const
pure virtual

Get the location of a rule in the list (if it is in the list).

Parameters
ruleIDThe ruleID you want to find.
Returns
The index of the rule in the list, or -1 if it's not in the list.
virtual IPreflightRuleInfo* IPreflightProfileRules::QueryNthRule (int32 n) const
pure virtual

Get one of the rules in the list.

Parameters
nThe index of the rule you want.
Returns
A refcounted rule info interface, or nil if n is out of bounds.
virtual IPreflightRuleInfo* IPreflightProfileRules::QueryRuleByID (const PreflightRuleIDruleID) const
pure virtual

Get the rule in the list that corresponds to the given rule ID.

Parameters
ruleIDThe rule ID you're looking for.
Returns
A refcounted rule info interface, or nil if the given rule doesn't appear in the profile.
virtual void IPreflightProfileRules::RemoveAllRules (bool deleteThem = kTrue)
pure virtual

Removes all rules from the list.

Parameters
deleteThemTrue to delete the rules from the database. False to leave them – but this is probably not what you want in most cases unless you've already taken ownership of all of them!
virtual void IPreflightProfileRules::RemoveNthRule (uint32 n,
bool deleteIt = kTrue 
)
pure virtual

Remove a rule from the list.

Parameters
nThe index of the rule you want to remove.
deleteITTrue to delete the rule boss from the database (ignored for in-memory profiles). False will remove the rule from the list but NOT delete the boss – that's your responsibility. Useful if you want to move the rule to another profile, say.
virtual void IPreflightProfileRules::UpdateAllRulesData ()
pure virtual

Utility for updating all the rules data in case any of the rule implementations have changed and the parameters need to be modified. For each rule in the list it grabs the IPreflightRuleUtilities interface and calls UpdateRuleData().