IDL Equivalents

prev next


IDL Equivalents

This appendix presents the verification point methods in Information Definition Language (IDL) format. You might find IDL format useful if you are implementing new verification point types in C++.

import "oaidl.idl";
import "ocidl.idl";
import "..\..\CTDatastore\CTDatastore.idl";

import "..\..\..\src\shlib\dcom\sqavuservices\vuservices.idl";

	 [
	 	 object,
	 	 uuid(F1DCD5A5-4F40-11D4-99DE-000000000000),
	 	 dual,
	 	 helpstring("IVerificationPointData Interface"),
	 	 pointer_default(unique)
	 ]

	 interface IVerificationPointData : IDispatch
	 {

	 [propget, id(1), helpstring("This property specifies the file
	 extension used by the VerificationPointData's disk representation. 
	 The correct extension is necessary for correct Comparator
	 behavior.")] 
	 HRESULT FileExtension([out, retval] BSTR *pVal);

	 [propput, id(1), helpstring("This property specifies the file
	 extension used by the VerificationPointData's disk representation. 
	 The correct extension is necessary for correct Comparator
	 behavior.")] 
	 HRESULT FileExtension([in] BSTR newVal);
	 };

	 [
	 	 object,
	 	 uuid(F1DCD5AA-4F40-11D4-99DE-000000000000),
	 	 dual,
	 	 helpstring("IVerificationPointComparator Interface"),
	 	 pointer_default(unique)
	 ]

	 interface IVerificationPointComparator : IDispatch
	 {

	 [id(1), helpstring("This method compares two objects impementing the
	 IVerificationPointData interface.  It should be invoked only by the
	 VP framework.")] 
	 HRESULT Compare([in] IVerificationPointData *ExpectedData, 
	 	 [in] IVerificationPointData *ActualData, [in] VARIANT Options,
	 	 [in, out] BSTR *FailureDescription, 
	 	 [out, retval]  VARIANT_BOOL *Result);
	 };

	 [
	 	 object,
	 	 uuid(F1DCD5AC-4F40-11D4-99DE-000000000000),
	 	 dual,
	 	 helpstring("IVerificationPointDataRenderer Interface"),
	 	 pointer_default(unique)
	 ]

	 interface IVerificationPointDataRenderer : IDispatch
	 {
	 
	 [id(1), helpstring("method DisplayAndValidateData")] 
	 HRESULT DisplayAndValidateData(
	 	 [in, out] IVerificationPointData **Data, 
	 	 [out, retval] VARIANT_BOOL *Valid);
	 };

	 [
	 	 object,
	 	 uuid(3E21F5BA-B4FF-46C2-9E35-8A784497DC91),
	 	 dual,
	 	 helpstring("IVPFramework Interface"),
	 	 pointer_default(unique)
	 ]

	 interface IVPFramework : IDispatch
	 {

	 [propget, id(1), helpstring("The name of the Verification Point")]
	 HRESULT VPname([out, retval] BSTR *pVal);

	 [propput, id(1), helpstring("The name of the Verification Point")]
	 HRESULT VPname([in] BSTR newVal);

	 [id(2), helpstring("This method performs the verification.  The
	 default verification is static.  To perform a dynamic verification,
	 pass an expected data object.  To perform a manual verification,
	 pass expected and actual data objects.")] 
	 HRESULT PerformTest([in] VARIANT Object, 
	 	 [in,optional] VARIANT ExpectedData, [in,optional] VARIANT
	 	 ActualData, [out, retval] enum VPResult *Result );

	 [hidden, propget, id(3), helpstring("For internal use only.")]
	 HRESULT VP ( [out, retval] LPDISPATCH *pVP );

	 [hidden, propput, id(3), helpstring("For internal use only.")]
	 HRESULT VP ( [in] LPDISPATCH newVP );

	 [hidden, propget, id(4), helpstring("For internal use only.")]
	 HRESULT Plumbing([out, retval] LPDISPATCH *pVal);

	 [hidden, propput, id(4), helpstring("For internal use only.")]
	 HRESULT Plumbing([in] LPDISPATCH newVal);

	 [hidden, propget, id(5), helpstring("A unique identifer to append to
	 a VP's code factory variable names.  This allows the code factory
	 methods to prevent name collisions when multiple VPs are created in
	 the same scope.")] 
	 HRESULT CodeFactorySuffix([out, retval] BSTR *pVal);

	 [hidden, propput, id(5), helpstring("A unique identifer to append to
	 a VP's code factory variable names.  This allows the code factory
	 methods to prevent name collisions when multiple VPs are created in
	 the same scope.")] 
	 HRESULT CodeFactorySuffix([in] BSTR newVal);
	 };

	 [
	 	 object,
	 	 uuid(F1DCD5A3-4F40-11D4-99DE-000000000000),
	 	 dual,
	 	 helpstring("IVerificationPoint Interface"),
	 	 pointer_default(unique)
	 ]

	 interface IVerificationPoint : IVPFramework
	 {

	 [hidden, id(15), helpstring("This method invokes a GUI to capture
	 the VP's definition.")] 
	 HRESULT DefineVP();

	 [hidden, id(16), helpstring("This method returns a syntactically
	 valid constructor invocation (for a given language) which can be
	 inserted into a recorded or generated script.")] 
	 HRESULT CodeFactoryGetConstructorInvocation([in] CTDScriptTypes
	 	 Language, [out, retval] BSTR *Code);

	 [hidden, id(17), helpstring("This method returns the number of
	 externalized input variables required for code generation of this 
	 VP 	 for a given language.")] 
	 HRESULT CodeFactoryGetNumExternallizedInputs([in] CTDScriptTypes
	 	 Language, [out, retval] short *NumInputs);

	 [hidden, id(18), helpstring("This method returns a line of
	 syntactically correct code (for a given language) declaring the nth
	 externalized input for this VP.")] 
	 HRESULT CodeFactoryGetExternalizedInputDecl([in] CTDScriptTypes
	 	 Language, [in] short InputNumber, [out, retval] BSTR *Code);

	 [hidden, id(19), helpstring("This method returns a line of
	 syntactically correct code (for a given language) initializing the
	 nth externalized input for this VP.")] 
	 HRESULT CodeFactoryGetExternalizedInputInit([in] CTDScriptTypes
	 	 Language, [in] short InputNumber, [out, retval] BSTR *Code);

	 [hidden, id(20), helpstring("This method returns the number of
	 property set calls required to fully specify this VP's definition
	 for code generation of this VP for a given language.")] 
	 HRESULT CodeFactoryGetNumPropertySet([in] CTDScriptTypes Language,
	 	 [out, retval] short *NumProps);

	 [hidden, id(21), helpstring("This method returns a line of
	 syntactically correct code (for a given language) setting the nth
	 property for this VP.")] 
	 HRESULT CodeFactoryGetPropertySet([in] CTDScriptTypes Language,
	 	 [in] short InputNumber, [out, retval] BSTR *Code);

	 [propget, id(22), helpstring("This property stores any Options which
	 affect the behavior of the DataProvider or the Comparator.")]
	 HRESULT Options([out, retval] VARIANT *pVal);

	 [propput, id(22), helpstring("This property stores any Options which
	 affect the behavior of the DataProvider or the Comparator.")]
	 HRESULT Options([in] VARIANT newVal);
	 };

	 [
	 	 object,
	 	 uuid(F1DCD5A8-4F40-11D4-99DE-000000000000),
	 	 dual,
	 	 helpstring("IVerificationPointDataProvider Interface"),
	 	 pointer_default(unique)
	 ]

	 interface IVerificationPointDataProvider : IDispatch
	 {

	 [id(1), helpstring("This method reads the VP's definition from the
	 supplied VP object, captures the data required by the VP, and
	 returns that data in a new IVerificationPointData object.")] 
	 HRESULT CaptureData([in] VARIANT Object,[in] IVerificationPoint *VP,
	 	 [out, retval] IVerificationPointData **Data);
	 };
	 
	 [
	 	 object,
	 	 uuid(15937740-5F7E-11d4-9A07-000000000000),
	 	 dual,
	 	 helpstring("IVPPlumbing Interface"),
	 	 pointer_default(unique)
	 ]

	 interface IVPPlumbing : IDispatch
	 {

	 [/*id(6),*/ helpstring("This method informs the VP Framework of the
	 helper components used by this VP type.")] 
	 HRESULT InitializeFramework([in] BSTR VPComparator, 
	 	 [in] BSTR VPData, [in] BSTR VPDataProvider, 
	 	 [in] BSTR VPDataRenderer);

	 [/*id(1),*/ helpstring("This method deserializes the VP from the
	 repo if necessary, calls the VPs defineVP method if required, and
	 serializes the resulting VP definition.")] 
	 HRESULT InitializeVP();

	 [propget, id(1), helpstring("This property specifies whether or not
	 the VP has been fully specified.  An incompletely specified VP will
	 have defineVP invoked by the Framework.")] 
	 HRESULT IsDefined([out, retval] VARIANT_BOOL *pVal);

	 [propput, id(1), helpstring("This property specifies whether or not
	 the VP has been fully specified.  An incompletely specified VP will
	 have defineVP invoked by the Framework.")] 
	 HRESULT IsDefined([in] VARIANT_BOOL newVal);

	 [propget, id(2), helpstring("This property specifies whether or not
	 the VP is in a valid state for PerformTest to be invoked.")] 
	 HRESULT IsValid([out, retval] VARIANT_BOOL *pVal);

	 [propput, id(2), helpstring("This property specifies whether or not
	 the VP is in a valid state for PerformTest to be invoked.")] 
	 HRESULT IsValid([in] VARIANT_BOOL newVal);

	 [propget, id(3), helpstring("This property contains the ProgID of
	 the VPComparator class for this VP")] 
	 	 HRESULT VPComparator([out, retval] BSTR *pVal);

	 [propput, id(3), helpstring("This property contains the ProgID of
	 the VPComparator class for this VP")] 
	 HRESULT VPComparator([in] BSTR newVal);

	 [propget, id(4), helpstring("This property contains the ProgID of
	 the VPData component for this VP")] 
	 HRESULT VPData([out, retval] BSTR *pVal);

	 [propput, id(4), helpstring("This property contains the ProgID of
	 the VPData component for this VP")] 
	 HRESULT VPData([in] BSTR newVal);

	 [propget, id(5), helpstring("This property contains the
	 VPDataProvider component for this VP.")] 
	 HRESULT VPDataProvider([out, retval] BSTR *pVal);

	 [propput, id(5), helpstring("This property contains the 
VPDataProvider component for this VP.")] 
	 HRESULT VPDataProvider([in] BSTR newVal);

	 [propget, id(6), helpstring("This property contains the
	 VPDataRenderer component for this VP.")] 
	 HRESULT VPDataRenderer([out, retval] BSTR *pVal);

	 [propput, id(6), helpstring("This property contains the
	 VPDataRenderer component for this VP.")] 
	 HRESULT VPDataRenderer([in] BSTR newVal);
	 };

	 [
	 	 object,
	 	 uuid(7C4870B0-6E1A-11D4-9A26-0010A4E86989),
	 	 dual,
	 	 helpstring("IDatabaseVP Interface"),
	 	 pointer_default(unique)
	 ]

	 interface IDatabaseVP : IVerificationPoint
	 {

	 [propget, helpstring("property ConnectionString")] 
	 HRESULT ConnectionString([out, retval] BSTR *pVal);

	 [propput, helpstring("property ConnectionString")] 
	 HRESULT ConnectionString([in] BSTR newVal);

	 [propget, helpstring("property SQL")] 
	 HRESULT SQL([out, retval] BSTR *pVal);

	 [propput, helpstring("property SQL")] 
	 HRESULT SQL([in] BSTR newVal);
	 };

	 [
	 	 object,
	 	 uuid(7C4870B3-6E1A-11D4-9A26-0010A4E86989),
	 	 dual,
	 	 helpstring("IDatabaseVPData Interface"),
	 	 pointer_default(unique)
	 ]

	 interface IDatabaseVPData : IVerificationPointData
	 {

	 [propget, helpstring("property NumCols")] 
	 HRESULT NumCols([out, retval] long *pVal);

	 [propput, helpstring("property NumCols")] 
	 HRESULT NumCols([in] long newVal);

	 [propget, helpstring("property NumRows")] 
	 HRESULT NumRows([out, retval] long *pVal);

	 [propput, helpstring("property NumRows")] 
	 HRESULT NumRows([in] long newVal);

	 [propget, helpstring("property Columns")] 
	 HRESULT Columns([out, retval] VARIANT *pVal);

	 [propput, helpstring("property Columns")] 
	 HRESULT Columns([in] VARIANT newVal);

	 [propget, helpstring("property Row")] 
	 HRESULT Row([in] long Index, [out, retval] VARIANT *pVal);

	 [propput, helpstring("property Row")] 
	 HRESULT Row([in] long Index, [in] VARIANT newVal);
	 };

[
	 uuid(20346813-4073-11D4-99CD-0010A4E86989),
	 version(1.0),
	 helpstring("Rational QualityArchitect COM Verification Point
	 	 Interface Type Library")
]

library RTIVP
{
	 importlib("stdole32.tlb");
	 importlib("stdole2.tlb");

	 enum VPResult
	 {
	 	 VERIFICATION_NO_RESULT = 0, // TSS_LOG_RESULT_NONE
	 	 VERIFICATION_SUCCEEDED = 1, // TSS_LOG_RESULT_PASS
	 	 VERIFICATION_FAILED    = 2, // TSS_LOG_RESULT_FAIL
	 	 VERIFICATION_ERROR     = 3, // TSS_LOG_RESULT_WARN
	 };

	 enum VPOptions
	 {
	 /** Specifies that the verification should be case insensitive. */
	 	 VPOPTION_COMPARE_CASEINSENSITIVE = 1,
    
	 /** Specifies that the first run of a static verification point 
	 should display 	 	 the captured data for the tester to validate before
	 storing it as the 	 	 	 expected (baseline) data object. */
	 	 VPOPTION_USER_ACKNOWLEDGE_BASELINE = 2,
	 	 VPOPTION_EXPECT_FAILURE = 4
	 };

	 enum DatabaseVPOptions
	 {
	 	 DATABASEVPOPTION_TRIM_WHITESPACE = 8	 	 	 	 	 	 	 
	 };

	 interface IVerificationPoint;
	 interface IVerificationPointData;
	 interface IVerificationPointDataProvider;
	 interface IVerificationPointDataRenderer;
	 interface IVerificationPointComparator;
	 interface IVPFramework;
	 interface IVPPlumbing;
	 interface IDatabaseVP;
	 interface IDatabaseVPData;
};





























prev next


Rational Test Script Services for Visual Basic Rational Software Corporation
Copyright (c) 2003, Rational Software Corporation http://www.rational.com
support@rational.com
info@rational.com