octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New type-checking internal function.


From: Eduardo
Subject: New type-checking internal function.
Date: Sun, 9 Mar 2014 15:14:41 +0100

Hi, while dealing with the  octave_value interface I am missing a function like "is_idx_type()". Imho should look like something like this:

bool is_idx_type(void) const
  {
    #if defined (USE_64_BIT_IDX_T)
     return is_int64_type();
   #else
     return is_integer_type();
   #endif
  }

provided how things are done in the following functions:

 octave_idx_type
octave_value::idx_type_value (bool req_int, bool frc_str_conv) const
{
#if defined (USE_64_BIT_IDX_T)
   return int64_value (req_int, frc_str_conv);
#else
   return int_value (req_int, frc_str_conv);
#endif


bool is_int64_type (void) const
   { return rep->is_int64_type (); }

bool is_integer_type (void) const
   { return rep->is_integer_type (); }


What about including something like that in the octave_value class?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]