69 lines
1.2 KiB
C++
69 lines
1.2 KiB
C++
#ifndef _COM_ARRAYBOUND_HPP_
|
|
#define _COM_ARRAYBOUND_HPP_
|
|
#ifndef _COM_OLEAUTO_HPP_
|
|
#include <com/oleauto.hpp>
|
|
#endif
|
|
|
|
class ArrayBound : public SAFEARRAYBOUND
|
|
{
|
|
public:
|
|
ArrayBound(void);
|
|
ArrayBound(unsigned long elements,long lowerBound=0);
|
|
~ArrayBound(); // must not be virtual
|
|
unsigned long elements(void)const;
|
|
void elements(unsigned long elements);
|
|
long lowerBound(void)const;
|
|
void lowerBound(long lowerBounb);
|
|
SAFEARRAYBOUND &getSAFEARRAYBOUND(void);
|
|
private:
|
|
};
|
|
|
|
inline
|
|
ArrayBound::ArrayBound(void)
|
|
{
|
|
SAFEARRAYBOUND::cElements=0;
|
|
SAFEARRAYBOUND::lLbound=0;
|
|
}
|
|
|
|
inline
|
|
ArrayBound::ArrayBound(unsigned long elements,long lowerBound)
|
|
{
|
|
SAFEARRAYBOUND::cElements=elements;
|
|
SAFEARRAYBOUND::lLbound=lowerBound;
|
|
}
|
|
|
|
inline
|
|
ArrayBound::~ArrayBound()
|
|
{
|
|
}
|
|
|
|
inline
|
|
unsigned long ArrayBound::elements(void)const
|
|
{
|
|
return SAFEARRAYBOUND::cElements;
|
|
}
|
|
|
|
inline
|
|
void ArrayBound::elements(unsigned long elements)
|
|
{
|
|
SAFEARRAYBOUND::cElements=elements;
|
|
}
|
|
|
|
inline
|
|
long ArrayBound::lowerBound(void)const
|
|
{
|
|
return SAFEARRAYBOUND::lLbound;
|
|
}
|
|
|
|
inline
|
|
void ArrayBound::lowerBound(long lowerBound)
|
|
{
|
|
SAFEARRAYBOUND::lLbound=lowerBound;
|
|
}
|
|
|
|
inline
|
|
SAFEARRAYBOUND &ArrayBound::getSAFEARRAYBOUND(void)
|
|
{
|
|
return *this;
|
|
}
|
|
#endif |