23 #if !defined (octave_ov_scalar_h)
24 #define octave_ov_scalar_h 1
75 bool resize_ok =
false);
77 type_conv_info numeric_demotion_function (
void)
const;
95 int8_array_value (
void)
const
99 int16_array_value (
void)
const
103 int32_array_value (
void)
const
107 int64_array_value (
void)
const
111 uint8_array_value (
void)
const
115 uint16_array_value (
void)
const
119 uint32_array_value (
void)
const
123 uint64_array_value (
void)
const
126 #define DEFINE_INT_SCALAR_VALUE(TYPE) \
128 TYPE ## _scalar_value (void) const \
129 { return octave_ ## TYPE (scalar); }
140 #undef DEFINE_INT_SCALAR_VALUE
144 float float_value (
bool =
false)
const
145 {
return static_cast<float> (
scalar); }
149 float float_scalar_value (
bool =
false)
const
150 {
return static_cast<float> (
scalar); }
190 char_array_value (
bool =
false)
const
193 retval(0) =
static_cast<char> (
scalar);
197 bool bool_value (
bool warn =
false)
const
219 octave_value convert_to_str_internal (
bool pad,
bool force,
char type)
const;
225 bool save_ascii (std::ostream& os);
227 bool load_ascii (std::istream& is);
229 bool save_binary (std::ostream& os,
bool& save_as_floats);
231 bool load_binary (std::istream& is,
bool swap,
234 #if defined (HAVE_HDF5)
235 bool save_hdf5 (hid_t loc_id,
const char *name,
bool save_as_floats);
237 bool load_hdf5 (hid_t loc_id,
const char *name);
244 return os.
write (array_value (), block_size, output_type,
248 mxArray *as_mxArray (
void)
const;
252 bool fast_elem_insert_self (
void *where,
builtin_type_t btyp)
const;