예제 #1
0
/**
 * Set the entire set of method attributes with one call.  Used
 * during source compilation.
 *
 * @param _access   The access setting.
 * @param _protected The protected setting.
 * @param _guarded   The guarded setting.
 */
void MethodClass::setAttributes(AccessFlag _access, ProtectedFlag _protected, GuardFlag _guarded)
{
    switch (_access)
    {
        case PRIVATE_SCOPE:
            setPrivate();
            break;

        case PACKAGE_SCOPE:
            setPackageScope();
            break;

        // covers PUBLIC and DEFAULT
        default:
            break;
    }

    if (_protected == PROTECTED_METHOD)
    {
        setProtected();
    }

    // both GUARDED and DEFAULT are guarded, so check for the reverse.
    if (_guarded == UNGUARDED_METHOD)
    {
        setUnguarded();
    }
}
예제 #2
0
파일: table.cpp 프로젝트: K-Lean/pgmodeler
void Table::operator = (Table &tab)
{
	QString prev_name = this->getName(true);

	(*dynamic_cast<BaseGraphicObject *>(this))=dynamic_cast<BaseGraphicObject &>(tab);
	this->with_oid=tab.with_oid;
	setProtected(tab.is_protected);

	PgSQLType::renameUserType(prev_name, this, this->getName(true));
}
예제 #3
0
void Table::operator = (Table &tab)
{
	QString prev_name = this->getName(true);

	(*dynamic_cast<BaseTable *>(this))=dynamic_cast<BaseTable &>(tab);

	this->with_oid=tab.with_oid;
	this->col_indexes=tab.col_indexes;
	this->constr_indexes=tab.constr_indexes;

	setGenerateAlterCmds(tab.gen_alter_cmds);
	setProtected(tab.is_protected);

	PgSQLType::renameUserType(prev_name, this, this->getName(true));
}
예제 #4
0
/**
 * Set the entire set of method attributes with one call.  Used
 * during source compilation.
 *
 * @param _private   The private setting.
 * @param _protected The protected setting.
 * @param _guarded   The guarded setting.
 */
void MethodClass::setAttributes(bool _private, bool _protected, bool _guarded)
{
    if (_private)
    {
        setPrivate();
    }
    if (_protected)
    {
        setProtected();
    }
    // guarded is the default, so we need to reverse this
    if (!_guarded)
    {
        setUnguarded();
    }
}
예제 #5
0
/**
 * Turn on a method's protected state from Rexx code.
 *
 * @return No return value.
 */
RexxObject *MethodClass::setProtectedRexx()
{
    setProtected();
    return OREF_NULL;
}