13 Fixnum(int i
) : the_fixnum( MAKE_FIXNUM(i
) )
17 Fixnum(long l
) : the_fixnum( MAKE_FIXNUM(i
) )
21 Fixnum(const cl_object
& obj
) :
23 the_fixnum
= other
.the_finxum
;
26 inline operator int() const
29 return fix(the_fixnum
);
31 return fixint(the_fixnum
);
35 inline operator long() const
38 return fix(the_fixnum
);
40 return fixint(the_fixnum
);
55 SingleFloat(float f
) : my_float(ecl_make_singlefloat(f
))
59 SingleFloat(const SingleFloat
& other
)
61 my_float
= other
.my_float
;
64 inline operator float() const {
65 ecl_to_float(my_float
);
68 inline operator cl_object() const {
79 String(std::string s
) : my_string(s
)
81 the_string
= make_simple_string(s
.c_str());
84 String(const String
& other
)
86 my_string
= other
.my_string();
87 the_string
= make_simple_string(s
.c_str());
90 inline operator std::string() const
92 return std::string(the_string
->self
);
95 inline operator cl_string()
102 // to do -- maybe a template class specialised on differen types
110 Vector(std::size_t size
, cl_eltype type
)
112 my_array
= si_make_vector(ecl_elttype_to_symbol(type
), MAKE_FIXNUM(dim
), Cnil
, MAKE_FIXNUM(0), Cnil
, MAKE_FIXNUM(0));
115 inline std::size_t size() const
117 return my_array
->dim
;
120 inline cl_eltype
elements() const
122 return array_elttype(my_array
);
125 inline cl_object
operator[](cl_index index
) const
127 return aref1(my_array
, index
);
130 // gratituous abuse of operator overloadin
131 inline cl_object
operator()(cl_index index
, cl_object value
)
133 return aset1(my_array
, index
, value
);
136 inline operator cl_object() const