예제 #1
0
void
Function::set_construct_destruct(int ftype, bool no_implicit_type_conversion)
{
    m_ftype = ftype;
    Class *pc = class_context();
//if (!is_plain() && pc) fail("must be within class definition");
    if (is_destructor()) {
        if(signature()->size() > 0) fail("destructor cannot be passed parameters");
        pc->destructor(this);
    } else if (is_constructor()) pc->add_constructor(this,no_implicit_type_conversion);
}
예제 #2
0
void Function::dump(ostream& os)
{
 Signature::set_fun_name(name(),is_constructor(),is_destructor()); 
 os << *signature();
}