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

#include <ScriptInfo.h>

Inheritance diagram for ScriptInfo::ObjectScriptElement:
ScriptInfo::ScriptElementScriptInfo::BaseScriptInfo

Public Member Functions

 ObjectScriptElement (const ObjectScriptElement &, const RequestContext &)
 
bool16 HasSingular () const
 
bool16 HasCollection () const
 
const PMStringGetFormattedName (ScriptElementType as=kObjectElement) const
 
const GUID & GetGUID () const
 
const ScriptElementIDGetSuite () const
 
const BaseScriptInfoGetCollectionInfo () const
 
BaseScriptInfoGetCollectionInfo ()
 
PMString GetCollectionFormattedName (ScriptElementType as=kObjectElement) const
 
const GUID & GetCollectionGUID () const
 
bool16 IsPropertyReadOnly (const ScriptElementID &propertyID, bool16 obsoleteArg=kTrue) const
 
bool16 IsPropertyReadOnly (const ScriptID &propertyID, bool16 obsoleteArg=kTrue) const
 
const ScriptElementIDGetBaseObject () const
 
const ObjectScriptElementFindBaseObject () const
 
bool16 IsObjectType (const ScriptElementID &id) const
 
bool16 IsObjectType (const ScriptID &type) const
 
bool16 IsPreferencesObject () const
 
bool16 IsSingletonChild () const
 
ObjectElementIterator Subclasses () const
 
const ParentProviderPacketFindParent (const ScriptElementID &id) const
 
const ParentProviderPacketFindParent (const ScriptID &id) const
 
const ParentProviderPacketFindParent (const PMString &name, ScriptElementType as=kObjectElement) const
 
const ChildProviderPacketFindChild (const ScriptElementID &id) const
 
const ChildProviderPacketFindChildBySingularID (const ScriptID &id) const
 
const ChildProviderPacketFindChildByCollectionID (const ScriptID &id) const
 
const ChildProviderPacketFindChildBySingularName (const PMString &name, ScriptElementType as=kObjectElement) const
 
const ChildProviderPacketFindChildByCollectionName (const PMString &name, ScriptElementType as=kObjectElement) const
 
const MethodProviderPacketFindMethod (const ScriptElementID &id) const
 
const MethodProviderPacketFindMethod (const ScriptID &id) const
 
const MethodProviderPacketFindMethod (const PMString &name, ScriptElementType as=kMethodElement) const
 
const
CollectionMethodProviderPacket
FindCollectionMethod (const ObjectScriptElement *parent, const ScriptElementID &id) const
 
const
CollectionMethodProviderPacket
FindCollectionMethod (const ObjectScriptElement *parent, const ScriptID &id) const
 
const
CollectionMethodProviderPacket
FindCollectionMethod (const ObjectScriptElement *parent, const PMString &name, ScriptElementType as=kMethodElement) const
 
const PropertyProviderPacketFindProperty (const ScriptElementID &id) const
 
const PropertyProviderPacketFindProperty (const ScriptID &id) const
 
const PropertyProviderPacketFindProperty (const PMString &name, ScriptElementType as=kPropertyElement) const
 
PropertyProviderIterator FindProperties (const ClassID &attributeID) const
 
const EventProviderPacketFindEvent (const ScriptElementID &id) const
 
const EventProviderPacketFindEvent (const ScriptID &id) const
 
const EventProviderPacketFindEvent (const PMString &name, ScriptElementType as=kEventElement) const
 
ParentProviderIterator Parents () const
 
ChildProviderIterator Children () const
 
MethodProviderIterator Methods (bool16 iterateBaseObjects=kTrue) const
 
CollectionMethodProviderIterator CollectionMethods (const ObjectScriptElement *parent=nil) const
 
PropertyProviderIterator Properties (bool16 iterateBaseObjects=kTrue) const
 
EventProviderIterator Events (bool16 iterateBaseObjects=kTrue) const
 
void AddSubclass (const ObjectScriptElement *subclass)
 
void AddParent (const ParentProviderPacket &pp)
 
void AddChild (const ChildProviderPacket &pp)
 
void AddMethod (const MethodProviderPacket &pp)
 
void AddCollectionMethod (const CollectionMethodProviderPacket &pp)
 
void AddProperty (const PropertyProviderPacket &pp)
 
void AddEvent (const EventProviderPacket &pp)
 
bool16 operator== (const ObjectScriptElement &) const
 
virtual void ReadWrite (IPMStream *s)
 
const RequestContextGetRequestContext () const
 
void SortChildren (PacketComp func)
 
- Public Member Functions inherited from ScriptInfo::ScriptElement
 ScriptElement (const ScriptElementID &siid, const ScriptID &id, const PMString &name, const PMString &desc)
 
const ElementContextGetContext () const
 
const ScriptElementIDGetScriptElementID () const
 
const PluginIDGetPluginID () const
 
const ScriptRecordData & GetMetadata () const
 
ScriptRecordData & GetMetadata ()
 
bool16 HasMetadata (const ScriptID &key, ScriptData &value) const
 
bool16 HasMetadata (const ScriptIDValuePair &kvp) const
 
bool16 operator== (const ScriptElement &) const
 
void SetContext (const ElementContext &context)
 
void SetPluginID (const PluginID &)
 
- Public Member Functions inherited from ScriptInfo::BaseScriptInfo
 BaseScriptInfo (const ScriptID &id, const PMString &name, const PMString &desc)
 
 BaseScriptInfo (const BaseScriptInfo &other)
 
const ScriptIDGetScriptID () const
 
const PMStringGetName () const
 
void SetName (const PMString &name)
 
const PMStringGetFormattedName (const FormatNamePolicy &policy) const
 
virtual PMString GetDescription () const
 
BaseScriptInfooperator= (const BaseScriptInfo &)
 
bool16 operator== (const BaseScriptInfo &) const
 

Friends

class ProviderPacketIterator< ObjectScriptElement, ParentProviderPacket, AccessParents >
 
class ProviderPacketIterator< ObjectScriptElement, ChildProviderPacket, AccessChildren >
 
class ProviderPacketIterator< ObjectScriptElement, MethodProviderPacket, AccessMethods >
 
class ProviderPacketIterator< ObjectScriptElement, CollectionMethodProviderPacket, AccessCollectionMethods >
 
class ProviderPacketIterator< ObjectScriptElement, PropertyProviderPacket, AccessProperties >
 
class ProviderPacketIterator< ObjectScriptElement, EventProviderPacket, AccessEvents >
 

Additional Inherited Members

- Public Types inherited from ScriptInfo::BaseScriptInfo
typedef object_type data_type
 
- Protected Types inherited from ScriptInfo::BaseScriptInfo
typedef
IDThreading::lock_guard
< IDThreading::spin_mutex
LockGuard
 
- Protected Member Functions inherited from ScriptInfo::BaseScriptInfo
PMString GetFormattedDescription (const ObjectScriptElement *) const
 
- Static Protected Member Functions inherited from ScriptInfo::BaseScriptInfo
static void FormatDescription (PMString &desc, const ObjectScriptElement *)
 
- Protected Attributes inherited from ScriptInfo::BaseScriptInfo
IDThreading::spin_mutex fMutex
 

Detailed Description

ObjectScriptElement represents an object in a scripting DOM.

Member Function Documentation

void ScriptInfo::ObjectScriptElement::AddChild (const ChildProviderPacketpp)

Add a child to this object

void ScriptInfo::ObjectScriptElement::AddCollectionMethod (const CollectionMethodProviderPacketpp)

Add a collection method to this object

void ScriptInfo::ObjectScriptElement::AddEvent (const EventProviderPacketpp)

Add an event to this object

void ScriptInfo::ObjectScriptElement::AddMethod (const MethodProviderPacketpp)

Add a method to this object

void ScriptInfo::ObjectScriptElement::AddParent (const ParentProviderPacketpp)

Add a parent to this object

void ScriptInfo::ObjectScriptElement::AddProperty (const PropertyProviderPacketpp)

Add a property to this object

void ScriptInfo::ObjectScriptElement::AddSubclass (const ObjectScriptElementsubclass)

Add a subclass object of this object

ChildProviderIterator ScriptInfo::ObjectScriptElement::Children () const

Retrieve an iterator for children of this object

CollectionMethodProviderIterator ScriptInfo::ObjectScriptElement::CollectionMethods (const ObjectScriptElementparent = nil) const

Retrieve an iterator for collection methods of this object

Parameters
parent- pass valid parent to limit iteration to collection methods on a particular parent
EventProviderIterator ScriptInfo::ObjectScriptElement::Events (bool16 iterateBaseObjects = kTrue) const

Retrieve an iterator for events of this object

Parameters
iterateBaseObjects- whether to include elements from base object(s)
const ObjectScriptElement* ScriptInfo::ObjectScriptElement::FindBaseObject () const

Get the base object (or nil, if none)

const ChildProviderPacket* ScriptInfo::ObjectScriptElement::FindChild (const ScriptElementIDid) const

Find provider information for a child of this object

const ChildProviderPacket* ScriptInfo::ObjectScriptElement::FindChildByCollectionID (const ScriptIDid) const

Find provider information for a child of this object

const ChildProviderPacket* ScriptInfo::ObjectScriptElement::FindChildByCollectionName (const PMStringname,
ScriptElementType as = kObjectElement 
) const

Find provider information for a child of this object

const ChildProviderPacket* ScriptInfo::ObjectScriptElement::FindChildBySingularID (const ScriptIDid) const

Find provider information for a child of this object

const ChildProviderPacket* ScriptInfo::ObjectScriptElement::FindChildBySingularName (const PMStringname,
ScriptElementType as = kObjectElement 
) const

Find provider information for a child of this object

const CollectionMethodProviderPacket* ScriptInfo::ObjectScriptElement::FindCollectionMethod (const ObjectScriptElementparent,
const ScriptElementIDid 
) const

Find provider information for a collection method on a particular parent of this object

const CollectionMethodProviderPacket* ScriptInfo::ObjectScriptElement::FindCollectionMethod (const ObjectScriptElementparent,
const ScriptIDid 
) const

Find provider information for a collection method on a particular parent of this object

const CollectionMethodProviderPacket* ScriptInfo::ObjectScriptElement::FindCollectionMethod (const ObjectScriptElementparent,
const PMStringname,
ScriptElementType as = kMethodElement 
) const

Find provider information for a collection method on a particular parent of this object

const EventProviderPacket* ScriptInfo::ObjectScriptElement::FindEvent (const ScriptElementIDid) const

Find provider information for an event of this object

const EventProviderPacket* ScriptInfo::ObjectScriptElement::FindEvent (const ScriptIDid) const

Find provider information for an event of this object

const EventProviderPacket* ScriptInfo::ObjectScriptElement::FindEvent (const PMStringname,
ScriptElementType as = kEventElement 
) const

Find provider information for an event of this object

const MethodProviderPacket* ScriptInfo::ObjectScriptElement::FindMethod (const ScriptElementIDid) const

Find provider information for a method of this object

const MethodProviderPacket* ScriptInfo::ObjectScriptElement::FindMethod (const ScriptIDid) const

Find provider information for a method of this object

const MethodProviderPacket* ScriptInfo::ObjectScriptElement::FindMethod (const PMStringname,
ScriptElementType as = kMethodElement 
) const

Find provider information for a method of this object

const ParentProviderPacket* ScriptInfo::ObjectScriptElement::FindParent (const ScriptElementIDid) const

Find provider information for a parent of this object

const ParentProviderPacket* ScriptInfo::ObjectScriptElement::FindParent (const ScriptIDid) const

Find provider information for a parent of this object

const ParentProviderPacket* ScriptInfo::ObjectScriptElement::FindParent (const PMStringname,
ScriptElementType as = kObjectElement 
) const

Find provider information for a parent of this object

PropertyProviderIterator ScriptInfo::ObjectScriptElement::FindProperties (const ClassIDattributeID) const

Find provider information for properties of this object associated with a particular attribute

const PropertyProviderPacket* ScriptInfo::ObjectScriptElement::FindProperty (const ScriptElementIDid) const

Find provider information for a property of this object

const PropertyProviderPacket* ScriptInfo::ObjectScriptElement::FindProperty (const ScriptIDid) const

Find provider information for a property of this object

const PropertyProviderPacket* ScriptInfo::ObjectScriptElement::FindProperty (const PMStringname,
ScriptElementType as = kPropertyElement 
) const

Find provider information for a property of this object

const ScriptElementID& ScriptInfo::ObjectScriptElement::GetBaseObject () const
inline

Get the id of the base object

PMString ScriptInfo::ObjectScriptElement::GetCollectionFormattedName (ScriptElementType as = kObjectElement) const

Return the formatted collection name

Parameters
aswhich kind of element
const GUID& ScriptInfo::ObjectScriptElement::GetCollectionGUID () const
inline

Get the collection GUID

const BaseScriptInfo* ScriptInfo::ObjectScriptElement::GetCollectionInfo () const
inline

Get the collection object info

BaseScriptInfo* ScriptInfo::ObjectScriptElement::GetCollectionInfo ()
inline

Get the collection object info

const PMString& ScriptInfo::ObjectScriptElement::GetFormattedName (ScriptElementType as = kObjectElement) const

Get the formatted name

Parameters
aswhich type of script element
const GUID& ScriptInfo::ObjectScriptElement::GetGUID () const
inline

Get the GUID

const RequestContext& ScriptInfo::ObjectScriptElement::GetRequestContext () const

Get the request context

const ScriptElementID& ScriptInfo::ObjectScriptElement::GetSuite () const
inline

Get the suite

bool16 ScriptInfo::ObjectScriptElement::HasCollection () const
inline

Returns kTrue if this object has a collection form

bool16 ScriptInfo::ObjectScriptElement::HasSingular () const
inline

Returns kTrue if this object has a singular form

bool16 ScriptInfo::ObjectScriptElement::IsObjectType (const ScriptElementIDid) const

Returns kTrue if this object is or is based on the specified object

Parameters
id- the base object to test
bool16 ScriptInfo::ObjectScriptElement::IsObjectType (const ScriptIDtype) const

Returns kTrue if this object is or is based on the specified object type

Parameters
type- the base type to test
bool16 ScriptInfo::ObjectScriptElement::IsPreferencesObject () const
inline

Returns kTrue if this object is a preferences object

bool16 ScriptInfo::ObjectScriptElement::IsPropertyReadOnly (const ScriptElementIDpropertyID,
bool16 obsoleteArg = kTrue 
) const

Returns kTrue if the property is read-only on this object

Parameters
propertyID- the property to check
obsoleteArg- ignored
bool16 ScriptInfo::ObjectScriptElement::IsPropertyReadOnly (const ScriptIDpropertyID,
bool16 obsoleteArg = kTrue 
) const

Returns kTrue if the property is read-only on this object

Parameters
propertyID- the property to check
obsoleteArg- ignored
bool16 ScriptInfo::ObjectScriptElement::IsSingletonChild () const
inline

Returns kTrue if this object is a singleton child object

MethodProviderIterator ScriptInfo::ObjectScriptElement::Methods (bool16 iterateBaseObjects = kTrue) const

Retrieve an iterator for methods of this object

Parameters
iterateBaseObjects- whether to include elements from base object(s)
ParentProviderIterator ScriptInfo::ObjectScriptElement::Parents () const

Retrieve an iterator for parents of this object

PropertyProviderIterator ScriptInfo::ObjectScriptElement::Properties (bool16 iterateBaseObjects = kTrue) const

Retrieve an iterator for properties of this object

Parameters
iterateBaseObjects- whether to include elements from base object(s)
virtual void ScriptInfo::ObjectScriptElement::ReadWrite (IPMStreams)
virtual

Persist this object

Reimplemented from ScriptInfo::ScriptElement.

void ScriptInfo::ObjectScriptElement::SortChildren (PacketComp func)

Sort children

ObjectElementIterator ScriptInfo::ObjectScriptElement::Subclasses () const

Return an iterator of objects for which this object is a base object