[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
class::static_type question
From: |
gumlym |
Subject: |
class::static_type question |
Date: |
Tue, 24 Jun 2014 08:21:08 -0700 (PDT) |
Hello, Im trying the example make_int.cc that is included in the sources and
Ive got a couple of questions. How do the functions
octave_integer::register_type (); and static_type_id() work? The thing is,
the example doesnt work. Or at least I cant make it work. After compiling
with mkoctfile, first I use make_int to create a variable. In the stdout it
prints that it has installed the type in the number 57. Then I try to use
the function doit. In that function, the following code is used:
if (args(0).type_id () == octave_integer::static_type_id ())
{
...........
}
else
gripe_wrong_type_arg ("doit", args(0));
The things is that it keeps giving argument error. args(0).type_id () is
indeed 57, but octave_integer::static_type_id() returns -1, so it never
enters the if clause. Does anyone know why this is happening? How do you
properly initialize a custom class?
Thank you very much!!
--
View this message in context:
http://octave.1599824.n4.nabble.com/class-static-type-question-tp4665010.html
Sent from the Octave - General mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- class::static_type question,
gumlym <=