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

#include <RsrcSpec.h>

Public Member Functions

 RsrcSpec ()
 
 RsrcSpec (const RsrcType &type, const RsrcID &indexOrID, bool16 byID=kTrue)
 
 RsrcSpec (PluginID pluginID, const RsrcType &type, const RsrcID &indexOrID, bool16 byID=kTrue)
 
 RsrcSpec (const PMLocaleId &localeId, PluginID pluginID, const RsrcType &type, const RsrcID &indexOrID, bool16 byID=kTrue)
 
PMLocaleId GetLocaleID () const
 
PluginID GetPluginID () const
 
RsrcType GetType () const
 
RsrcID GetIndexOrID () const
 
bool16 GetByID () const
 

Detailed Description

Class used to specify a resource.

IDResourceShell::GetResource takes a RsrcSpec. By default you can create

a resource spec by giving it a type and id. But if you are iterating over all

resources of a given type you can set the optionaly third parameter, byID, to false. This

will treat the ID field as an index. This class makes it so that we don't have to

overload every method in shuksan that takes a resource type and id to be able to

specify type and index.

Constructor & Destructor Documentation

RsrcSpec::RsrcSpec ()
inline

Empty Contructor - creates an invalid resource

RsrcSpec::RsrcSpec (const RsrcType & type,
const RsrcID & indexOrID,
bool16 byID = kTrue 
)
inline

Constructor - specify a resource by type and ID (or index)

RsrcSpec::RsrcSpec (PluginID pluginID,
const RsrcType & type,
const RsrcID & indexOrID,
bool16 byID = kTrue 
)
inline

Constructor - specify a resource by type and ID (or index) and pluginID

RsrcSpec::RsrcSpec (const PMLocaleIdlocaleId,
PluginID pluginID,
const RsrcType & type,
const RsrcID & indexOrID,
bool16 byID = kTrue 
)
inline

Constructor - specify a resource by type and ID (or index) and pluginID and for a specific localeID

Member Function Documentation

bool16 RsrcSpec::GetByID () const
inline

Get the flag controllong whether it refers to resources by index or ID (kTrue by default, meaning by ID)

RsrcID RsrcSpec::GetIndexOrID () const
inline

Get the resource ID (or index if RsrcApec was constructed with fByID == kFalse

PMLocaleId RsrcSpec::GetLocaleID () const
inline

Get the locale ID

PluginID RsrcSpec::GetPluginID () const
inline

Get the plugin ID

RsrcType RsrcSpec::GetType (void ) const
inline

Get the resource type