HP LoadRunner Protocol SDK Test Run API Reference  12.02
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ApiFunctions.h
Go to the documentation of this file.
1 #ifndef LR_PROTOCOL_SDK_API_FUNCTIONS_H_
4 #define LR_PROTOCOL_SDK_API_FUNCTIONS_H_
5 
6 #include "ProtocolException.h"
7 
8 #include <stdarg.h>
9 
10 struct ApiFunctionData;
11 
27 class PROTOCOL_EXTENSION_DECLSPEC CApiFunction
28 {
29 
30 public:
35  const char* mDisplayName = "",
36  int mIconId = -1
37  );
38 
40  virtual ~CApiFunction();
41 
48  int Run(
49  const char* mStepName,
50  va_list mVaList = 0
51  );
52 
58  void WastedTime(
59  long mMilliSeconds
60  );
61 
67  void ThinkTime(
68  long mSeconds
69  );
70 
77  void SetResultMessage(
78  int mMessageID,
79  ...
80  );
81 
82 protected:
83 
87  virtual void Init() = 0;
88 
93  virtual void
94  HandleArguments(
95  va_list mVaList
96  );
97 
99  virtual void Invoke() = 0;
100 
104  virtual void Terminate() = 0;
105 
110  virtual void Abort() = 0;
111 
112  char * m_stepName;
114  int m_iconId;
115  char* m_fullName;
116 
117 private:
118 
119  CApiFunction(const CApiFunction& ){}; // Don't implement the copy method. Objects of this type should not be copied.
120  CApiFunction& operator=(const CApiFunction& ) {return *this;} // Don't copy
121 
123  void InternalInit();
124 
126  void InternalTerminate();
127 
129  void InternalAbort();
130 
132  void InternalAbort(CProtocolException& mException);
133 
134  // Data members
135  ApiFunctionData* m_data;
136 };
137 
138 #endif
139 
140 
char * m_stepName
The display name for the step in which this API function is called.
Definition: ApiFunctions.h:112
This file contains declarations of protocol exception.
Class CProtocolException represents an exception condition.
Definition: ProtocolException.h:20
char * m_displayName
The API function display name used in log messages and in the result report.
Definition: ApiFunctions.h:113
char * m_fullName
The name used in log messages.
Definition: ApiFunctions.h:115
The base class for handling API execution.
Definition: ApiFunctions.h:27
int m_iconId
The API function icon id. The icon is used in the test result report.
Definition: ApiFunctions.h:114


Send documentation feedback to HP.


© 1995-2015 Hewlett-Packard Development Company, L.P.