11 #ifndef __GT_DARange__
12 #define __GT_DARange__
54 init(start, stop, step);
58 : myStart(src.myStart)
69 const char *
className()
const override {
return "GT_DARange"; }
76 myStep = (step == 0) ? 1 : step;
82 {
return isBig(myStart) || isBig(myEnd)
89 {
return sizeof(*this); }
96 n = (myEnd - myStart) + (
myStep-1);
98 n = (myEnd - myStart) + (
myStep+1);
102 {
return myStart + offset*
myStep; }
104 {
return myStart + offset*
myStep; }
106 {
return myStart + offset*
myStep; }
108 {
return myStart + offset*
myStep; }
110 {
return myStart + offset*
myStep; }
112 {
return myStart + offset*
myStep; }
132 return v < -0x7ffffff || v > 0x7ffffff;
GT_DARange(const GT_DARange &src)
Copy constructor.
GT_Offset getDictIndex(GT_Offset, int) const override
GT_Type getTypeInfo() const override
void init(GT_Offset start, GT_Offset end, GT_Size step=1)
Initialize with given data.
void getIndexedDicts(UT_Array< UT_OptionsHolder > &, UT_IntArray &) const override
GT_DARange(GT_Offset stop, GT_Type type=GT_TYPE_NONE)
Initialize [0..stop)
const char * className() const override
GT_DARange(GT_Offset start, GT_Offset stop, GT_Type type=GT_TYPE_NONE)
Initialize [start..stop)
Abstract data class for an array of float, int or string data.
void getIndexedStrings(UT_StringArray &, UT_IntArray &) const override
GT_Size entries() const override
static const UT_StringHolder theEmptyString
int32 getI32(GT_Offset offset, int) const override
GT_DARange(GT_Offset start, GT_Offset stop, GT_Offset step, GT_Type type=GT_TYPE_NONE)
Initialize [start..stop, by step)
A range of values similar to the python range function.
GT_Storage getStorage() const override
fpreal32 getF32(GT_Offset offset, int) const override
int64 getI64(GT_Offset offset, int) const override
GT_Offset getStringIndex(GT_Offset, int) const override
GT_String getS(GT_Offset, int) const override
GT_Size getTupleSize() const override
fpreal64 getF64(GT_Offset offset, int) const override
GT_DARange(GT_Type type=GT_TYPE_NONE)
Default constructor (empty range)
GT_Size getStringIndexCount() const override
uint8 getU8(GT_Offset offset, int) const override
GT_Size getDictIndexCount() const override
int64 getMemoryUsage() const override
fpreal16 getF16(GT_Offset offset, int) const override