Changeset 66:f7c8521991df in xplra for src/plugin
- Timestamp:
- 04/09/13 15:41:24 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/plugin/src/xplra
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/plugin/src/xplra/GetDataRefTask.h
r13 r66 246 246 * Construct the task for the dataref with the given name. 247 247 * 248 * @param name the name of the dataref 248 249 * @param maxCount the maximal number of items to retrieve. If <0, 249 250 * the function will perform an extra query to retrieve the size of 250 251 * of the dataref's data, which it will store in the task, so 251 252 * later on it can be reused. 253 * @param offset the offset from which to query the array 252 254 */ 253 255 GetArrayDataRefTask(const std::string& name, … … 257 259 * Construct the task for the given dataref 258 260 * 261 * @param dataRef the dataref 259 262 * @param maxCount the maximal number of items to retrieve. If <0, 260 263 * the function will perform an extra query to retrieve the size 261 264 * of the dataref's data, which it will store in the task, so 262 265 * later on it can be reused. 266 * @param offset the offset from which to query the array 263 267 */ 264 268 GetArrayDataRefTask(XPLMDataRef dataRef, … … 313 317 * Construct the task for the dataref with the given name. 314 318 * 319 * @param name the name of the dataref 315 320 * @param maxCount the maximal number of data items to 316 321 * retrieve. If <0, the function will perform an extra query to 317 322 * retrieve the size of the dataref's data, which it will store in 318 323 * the task, so later on it can be reused. 324 * @param offset the offset from which to query the array 319 325 */ 320 326 GetFloatArrayDataRefTask(const std::string& name, … … 324 330 * Construct the task for the given dataref 325 331 * 326 * @param maxBytes the maximal number of data items to 327 * retrieve. If <0, the function will perform an extra query to 328 * retrieve the size of the dataref's data, which it will store in 329 * the task, so later on it can be reused. 330 */ 331 GetFloatArrayDataRefTask(XPLMDataRef dataRef, 332 int maxCount = -1, int offset = 0); 333 }; 334 335 //------------------------------------------------------------------------------ 336 //------------------------------------------------------------------------------ 337 338 /** 339 * A dataref task which retrieves the value of an integer array. 340 */ 341 class GetIntArrayDataRefTask : 342 public GetArrayDataRefTask<int, GetIntArrayDataRefTask> 343 { 344 public: 345 /** 346 * Get the data via XPLM 347 */ 348 static int queryData(XPLMDataRef dataRef, int* dest, 349 int offset, int count); 350 351 public: 352 /** 353 * Construct the task for the dataref with the given name. 354 * 332 * @param dataRef the dataref 355 333 * @param maxCount the maximal number of data items to 356 334 * retrieve. If <0, the function will perform an extra query to 357 335 * retrieve the size of the dataref's data, which it will store in 358 336 * the task, so later on it can be reused. 359 */ 360 GetIntArrayDataRefTask(const std::string& name, 361 int maxCount = -1, int offset = 0); 362 363 /** 364 * Construct the task for the given dataref 365 * 366 * @param maxBytes the maximal number of data items to 337 * @param offset the offset from which to query the array 338 */ 339 GetFloatArrayDataRefTask(XPLMDataRef dataRef, 340 int maxCount = -1, int offset = 0); 341 }; 342 343 //------------------------------------------------------------------------------ 344 //------------------------------------------------------------------------------ 345 346 /** 347 * A dataref task which retrieves the value of an integer array. 348 */ 349 class GetIntArrayDataRefTask : 350 public GetArrayDataRefTask<int, GetIntArrayDataRefTask> 351 { 352 public: 353 /** 354 * Get the data via XPLM 355 */ 356 static int queryData(XPLMDataRef dataRef, int* dest, 357 int offset, int count); 358 359 public: 360 /** 361 * Construct the task for the dataref with the given name. 362 * 363 * @param name the name of the dataref 364 * @param maxCount the maximal number of data items to 367 365 * retrieve. If <0, the function will perform an extra query to 368 366 * retrieve the size of the dataref's data, which it will store in 369 367 * the task, so later on it can be reused. 368 * @param offset the offset from which to query the array 369 */ 370 GetIntArrayDataRefTask(const std::string& name, 371 int maxCount = -1, int offset = 0); 372 373 /** 374 * Construct the task for the given dataref 375 * 376 * @param dataRef the dataref 377 * @param maxCount the maximal number of data items to 378 * retrieve. If <0, the function will perform an extra query to 379 * retrieve the size of the dataref's data, which it will store in 380 * the task, so later on it can be reused. 381 * @param offset the offset from which to query the array 370 382 */ 371 383 GetIntArrayDataRefTask(XPLMDataRef dataRef, … … 393 405 * Construct the task for the dataref with the given name. 394 406 * 407 * @param name the name of the dataref 395 408 * @param maxBytes the maximal number of bytes to retrieve. If <0, 396 409 * the function will perform an extra query to retrieve the size 397 410 * of the dataref's data, which it will store in the task, so 398 411 * later on it can be reused. 412 * @param offset the offset from which to query the array 399 413 */ 400 414 GetByteArrayDataRefTask(const std::string& name, … … 404 418 * Construct the task for the given dataref 405 419 * 420 * @param dataRef the dataref 406 421 * @param maxBytes the maximal number of bytes to retrieve. If <0, 407 422 * the function will perform an extra query to retrieve the size 408 423 * of the dataref's data, which it will store in the task, so 409 424 * later on it can be reused. 425 * @param offset the offset from which to query the array 410 426 */ 411 427 GetByteArrayDataRefTask(XPLMDataRef dataRef, -
src/plugin/src/xplra/SetDataRefTask.h
r13 r66 62 62 * signifies an error only, if some wrong data is read. If the 63 63 * stream fails, it will indicate RESULT_OK. 64 * @param stream the stream to read from 64 65 * 65 66 * @return the new instance or 0 on error.
Note:
See TracChangeset
for help on using the changeset viewer.