struct id_element error_on_off_names[]= {
{ ERROR_PARENT, "unset" },
- { ERROR_ON , "on" },
- { ERROR_OFF , "off" },
- { 0 , 0 }
+ { ERROR_ON , "on" },
+ { ERROR_OFF , "off" },
+ { 0 , 0 }
};
static class cl_error_registry error_registry;
/*
*/
-cl_error_class::cl_error_class(enum error_type typ, char *aname,
- enum error_on_off be_on/* = ERROR_PARENT*/):
+cl_error_class::cl_error_class(enum error_type typ, const char *aname,
+ enum error_on_off be_on/* = ERROR_PARENT*/):
cl_base()
{
type= typ;
set_name(aname, "not-known");
}
-cl_error_class::cl_error_class(enum error_type typ, char *aname,
- class cl_error_class *parent,
- enum error_on_off be_on/* = ERROR_PARENT*/):
+cl_error_class::cl_error_class(enum error_type typ, const char *aname,
+ class cl_error_class *parent,
+ enum error_on_off be_on/* = ERROR_PARENT*/):
cl_base()
{
type= typ;
if (on == ERROR_PARENT)
{
if (!get_parent())
- return(DD_TRUE);
+ return(DD_TRUE);
class cl_error_class *p=
- dynamic_cast<class cl_error_class *>(get_parent());
+ dynamic_cast<class cl_error_class *>(get_parent());
return(p->is_on());
}
else
return(name);
}*/
-char *
+const char *
cl_error_class::get_type_name()
{
return(get_id_string(error_type_names, type, "untyped"));
}
void
-cl_error::print(class cl_commander *c)
+cl_error::print(class cl_commander_base *c)
{
c->dd_printf("%s\n", get_type_name());
}
-char *
+const char *
cl_error::get_type_name()
{
enum error_type type= get_type();