wavelength 1.0.0
Loading...
Searching...
No Matches
HxLongSafeArray.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
6
13public:
20 HxLongSafeArray(SAFEARRAY *array);
21
28 HxLongSafeArray(std::vector<int> &values);
29
36
44 long Get(long iIndex);
45
53 void Set(long iIndex, long value);
54
61 void GetVariant(VARIANT *variant);
62
69 void SetFromVector(std::vector<int> &values);
70
71private:
72 bool mOwned;
73};
~HxLongSafeArray()
Destroy the array when the object created it.
void SetFromVector(std::vector< int > &values)
Replace the elements with those of a vector.
void GetVariant(VARIANT *variant)
Refer a variant to the array, without copying it.
long Get(long iIndex)
Read an element.
void Set(long iIndex, long value)
Write an element.
HxLongSafeArray(std::vector< int > &values)
Create an array that the object destroys, with the elements of a vector.
HxLongSafeArray(SAFEARRAY *array)
Wrap an array, or create an empty one that the object destroys.
HxSafeArray(SAFEARRAY *array)
Wrap an array and count its elements.