Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IDSSShortcut Interface Reference

Inherited by IDSSShortcut2.

List of all members.

Public Member Functions

HRESULT Exports ([out, retval] IDSSExports ppExports)
 Exports into the target.
HRESULT IsMe ([in] VARIANT_BOOL IsMe)
 Whether the target is the DSS Object that contains this expression.
HRESULT IsMe ([out, retval] VARIANT_BOOL *pIsMe)
 Whether the target is the DSS Object that contains this expression.
HRESULT Node ([out, retval] IDSSNode ppNode)
 The node interface for this shortcut.
HRESULT Populate ([in] IDSSShortcut *pOriginal)
 Assign a value to this function from another function.
HRESULT Prompt ([in] IDSSPrompt *pPrompt)
 This prompt is used to obtain the target.
HRESULT Prompt ([out, retval] IDSSPrompt ppPrompt)
 This prompt is used to obtain the target.
HRESULT Target ([in] IDSSObjectInfo *pTarget)
 Set the object pointed to by the shortcut.
HRESULT Target ([out, retval] IDSSObjectInfo ppTarget)
 The object pointed to by the shortcut.
HRESULT TargetID ([out, retval] BSTR *pTargetID)
 The ID of the target object.
HRESULT TargetName ([out, retval] BSTR *pTargetName)
 The name of the target object (if known).
HRESULT TargetPath ([out, retval] BSTR *pTargetPath)
 The path of the target object (if known).
HRESULT TargetType ([out, retval] EnumDSSObjectType *pTargetType)
 The type of the target object (if known).


Member Function Documentation

HRESULT IDSSShortcut::Exports [out, retval] IDSSExports   ppExports  ) 
 

Exports into the target.

This is a collection interface. It contains exports from this object into the target object. It is not used to export prompts into the Prompt property (use Prompt.ExportsToPrompt to do this).

If this object does not support prompts, or there is no Target object, then this collection is not needed, and returns NULL.
An implementation which creates Exports only the first time that Target is not NULL, but then does not destroy it even if Target becomes NULL is acceptable. Only persists the Exports collection when there is a Target though.
Parameters:
ppExports Collection of Exports into Target. May return NULL.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSShortcut::IsMe [in] VARIANT_BOOL  IsMe  ) 
 

Whether the target is the DSS Object that contains this expression.

The Boolean property indicates whether the target is the DSS Object that contains this expression. The default value is false.

Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSShortcut::IsMe [out, retval] VARIANT_BOOL *  pIsMe  ) 
 

Whether the target is the DSS Object that contains this expression.

The Boolean property indicates whether the target is the DSS Object that contains this expression. The default value is false.

Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSShortcut::Node [out, retval] IDSSNode   ppNode  ) 
 

The node interface for this shortcut.

Node is a read-only property. It returns the IDSSNode interface associated with this expression node. This interface contains methods and properties that are common to all types of nodes in expressions. In particular it contains methods used to navigate between different nodes in the expression.

Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSShortcut::Populate [in] IDSSShortcut pOriginal  ) 
 

Assign a value to this function from another function.

This method acts like an assignment operator in C++. It replaces the definition of this object with the definition of the argument. It is used to implement cloning of the argument object.

Parameters:
pOriginal The original object.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSShortcut::Prompt [in] IDSSPrompt pPrompt  ) 
 

This prompt is used to obtain the target.

Prompt is a read-write prompt-valued property. If the shortcut uses a prompt then it is recorded here. If there is a prompt then the Target property and other similar properties are unused.

Only a shortcut in an expression can be prompted. The DSS Shortcut object in the metadata cannot contain prompts - it is not an application level object.
Only object prompts can be used on a shortcut. However, there are several possible scenarios that are handled:
  • If the prompt is canceled, or contains 0 objects, then this node is deleted entirely on substitution. If the node is the child of an operator then we delete the operator and all its children.
  • The prompt returns a single object. On substitution, a node targeted to the result of the prompt will replace this node.
  • The prompt returns multiple objects. If this node is the root node of the expression, then the node will be replaced by shortcuts to each object spanned by an AND operator. If this node is the child of an operator, then replace it by shortcuts to each object put into the prompt.
Setting this property automatically turns Target, TargetID to NULL, GUID_NULL, etc.
Parameters:
pPrompt The new value of the prompt. May be NULL. Prompt question = use as underlying prompt instance. Prompt instance (this object) = use this instance. Other prompt instance = use underlying prompt object. Prompt object = use first instance in this object based on this prompt object.
Returns:
Usual COM result code:
  • S_OK
  • RESSVR_E_NOT_PROMPTABLE Cannot set the prompt because this application object does not support prompts.
  • OBJSVR_E_NO_PROMPT_TYPE This prompt was not given a prompt type
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE Can't use this prompt - it is not a suitable type

HRESULT IDSSShortcut::Prompt [out, retval] IDSSPrompt   ppPrompt  ) 
 

This prompt is used to obtain the target.

Prompt is a read-write prompt-valued property. If the shortcut uses a prompt then it is recorded here. If there is a prompt then the Target property and other similar properties are unused.

Only a shortcut in an expression can be prompted. The DSS Shortcut object in the metadata cannot contain prompts - it is not an application level object.
Only object prompts can be used on a shortcut. However, there are several possible scenarios that are handled:
  • If the prompt is canceled, or contains 0 objects, then this node is deleted entirely on substitution. If the node is the child of an operator then we delete the operator and all its children.
  • The prompt returns a single object. On substitution, a node targeted to the result of the prompt will replace this node.
  • The prompt returns multiple objects. If this node is the root node of the expression, then the node will be replaced by shortcuts to each object spanned by an AND operator. If this node is the child of an operator, then replace it by shortcuts to each object put into the prompt.
Setting this property automatically turns Target, TargetID to NULL, GUID_NULL, etc.
Parameters:
ppPrompt A prompt instance from the DSS Object that contains this node. NULL if the node has no prompt.
Returns:
Usual COM result code:
  • S_OK
  • RESSVR_E_NOT_PROMPTABLE Cannot set the prompt because this application object does not support prompts.
  • OBJSVR_E_NO_PROMPT_TYPE This prompt was not given a prompt type
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE Can't use this prompt - it is not a suitable type

HRESULT IDSSShortcut::Target [in] IDSSObjectInfo pTarget  ) 
 

Set the object pointed to by the shortcut.

(Null if the link is broken.). This property records the object pointer to by the shortcut. The object is stored by recording its objectID only. If know object can be found with this ID then reading the property returns NULL, and an error message.

Parameters:
pTarget The object pointed to by the shortcut. NULL if the link is broken.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSShortcut::Target [out, retval] IDSSObjectInfo   ppTarget  ) 
 

The object pointed to by the shortcut.

(Null if the link is broken.). This property records the object pointer to by the shortcut. The object is stored by recording its objectID only. If know object can be found with this ID then reading the property returns NULL, and an error message.

Parameters:
ppTarget The object pointed to by the shortcut. NULL if the link is broken.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSShortcut::TargetID [out, retval] BSTR *  pTargetID  ) 
 

The ID of the target object.

Return the ID of the target. This information is always available even if the link is broken.

Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSShortcut::TargetName [out, retval] BSTR *  pTargetName  ) 
 

The name of the target object (if known).

Return the name of the target. It is up to the implementation to decide if this is recorded in the shortcut, or is extracted from the object returned by the ID. In the latter case this information is not available if the link is broken.

Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSShortcut::TargetPath [out, retval] BSTR *  pTargetPath  ) 
 

The path of the target object (if known).

Return the path of the target. It is up to the implementation to decide if this is recorded in the shortcut, or is extracted from the object returned by the ID. In the latter case this information is not available if the link is broken.

Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSShortcut::TargetType [out, retval] EnumDSSObjectType pTargetType  ) 
 

The type of the target object (if known).

Return the type of the target. It is up to the implementation to decide if this is recorded in the shortcut, or is extracted from the object returned by the ID. In the latter case this information is not available if the link is broken.

Returns:
Usual COM result code:
  • S_OK


Copyright © 1996-2018 MicroStrategy Inc. All Rights Reserved.