if(compareFuncContent!=_cmp_func_content)
{
std::ostringstream oss; oss << "PickelizedPyObjRdExtFreeStyleServer::checkSame : content of compare func are not exactly the same ! It should !";
- throw Exception(oss.str());
+ throw NotSameException(oss.str());
}
SALOME::AutoPyRef resu(PyObject_CallFunctionObjArgs(_cmp_func,oldObj,newObj,nullptr));
if(resu.isNull())
{
std::ostringstream oss; oss << "PickelizedPyObjRdExtFreeStyleServer::checkSame : evaluation of function failed !";
- throw Exception(oss.str());
+ throw NotSameException(oss.str());
}
if(resu.get()!=Py_False && resu.get()!=Py_True)
{
std::ostringstream oss; oss << "PickelizedPyObjRdExtFreeStyleServer::checkSame : evaluation of function is OK but a boolean is expected !";
- throw Exception(oss.str());
+ throw NotSameException(oss.str());
}
if(resu.get()==Py_False)
{
std::ostringstream oss; oss << "PickelizedPyObjRdExtFreeStyleServer::checkSame : comparison function returns False. 2 pybjects are considered different -> createRdExtVarFreeStyleTransac fails !";
- throw Exception(oss.str());
+ throw NotSameException(oss.str());
}
}
{
public:
TransactionVarCreate(DataScopeServerTransaction *dsct, const std::string& varName, const SALOME::ByteVec& constValue);
- void prepareRollBackInCaseOfFailure();
- void rollBack();
- void notify();
+ void prepareRollBackInCaseOfFailure() override;
+ void rollBack() override;
+ void notify() override;
protected:
std::vector<unsigned char> _data;
};
{
public:
TransactionRdExtVarCreate(DataScopeServerTransaction *dsct, const std::string& varName, const SALOME::ByteVec& constValue):TransactionVarCreate(dsct,varName,constValue) { }
- void perform();
+ void perform() override;
};
class TransactionRdExtVarFreeStyleCreate : public TransactionRdExtVarCreate
{
public:
TransactionRdExtVarFreeStyleCreate(DataScopeServerTransaction *dsct, const std::string& varName, const SALOME::ByteVec& constValue, const char *compareFuncContent);
- void prepareRollBackInCaseOfFailure();
- void perform();
+ void prepareRollBackInCaseOfFailure() override;
+ void rollBack() override;
+ void perform() override;
protected:
+ bool _null_rollback = false;
std::string _cmp_func_content;
SALOME::AutoPyRef _cmp_func;
};
{
public:
TransactionRdExtInitVarCreate(DataScopeServerTransaction *dsct, const std::string& varName, const SALOME::ByteVec& constValue):TransactionVarCreate(dsct,varName,constValue) { }
- void perform();
+ void perform() override;
};
class TransactionRdWrVarCreate : public TransactionVarCreate
{
public:
TransactionRdWrVarCreate(DataScopeServerTransaction *dsct, const std::string& varName, const SALOME::ByteVec& constValue):TransactionVarCreate(dsct,varName,constValue) { }
- void perform();
+ void perform() override;
};
class TransactionKillVar : public Transaction
{
public:
TransactionKillVar(DataScopeServerTransaction *dsct, const std::string& varName);
- void prepareRollBackInCaseOfFailure();
- void perform();
- void rollBack();
- void notify();
+ void prepareRollBackInCaseOfFailure() override;
+ void perform() override;
+ void rollBack() override;
+ void notify() override;
};
class PickelizedPyObjServer;
public:
TransactionDictModify(DataScopeServerTransaction *dsct, const std::string& varName);
PickelizedPyObjServer *checkVarExistingAndDict() { return _dsct->checkVarExistingAndDict(_var_name); }
- void prepareRollBackInCaseOfFailure();
- void rollBack();
+ void prepareRollBackInCaseOfFailure() override;
+ void rollBack() override;
protected:
std::string _zeDataBefore;
PickelizedPyObjServer *_varc;
{
public:
TransactionAddKeyValue(DataScopeServerTransaction *dsct, const std::string& varName, const SALOME::ByteVec& key, const SALOME::ByteVec& value);
- void prepareRollBackInCaseOfFailure();
- void notify();
+ void prepareRollBackInCaseOfFailure() override;
+ void notify() override;
~TransactionAddKeyValue();
protected:
PyObject *_key;
{
public:
TransactionAddKeyValueHard(DataScopeServerTransaction *dsct, const std::string& varName, const SALOME::ByteVec& key, const SALOME::ByteVec& value);
- void perform();
+ void perform() override;
};
class TransactionAddKeyValueErrorIfAlreadyExisting : public TransactionAddKeyValue
{
public:
TransactionAddKeyValueErrorIfAlreadyExisting(DataScopeServerTransaction *dsct, const std::string& varName, const SALOME::ByteVec& key, const SALOME::ByteVec& value);
- void perform();
+ void perform() override;
};
class TransactionRemoveKeyInVarErrorIfNotAlreadyExisting : public TransactionDictModify
{
public:
TransactionRemoveKeyInVarErrorIfNotAlreadyExisting(DataScopeServerTransaction *dsct, const std::string& varName, const SALOME::ByteVec& key);
- void perform();
- void notify();
+ void perform() override;
+ void notify() override;
~TransactionRemoveKeyInVarErrorIfNotAlreadyExisting();
private:
PyObject *_key;
SALOME::PickelizedPyObjRdWrServer_ptr getVar();
public:
void prepareRollBackInCaseOfFailure();
- void perform();
- void rollBack();
- void notify();
+ void perform() override;
+ void rollBack() override;
+ void notify() override;
};
/*!
public://remotely callable
void addKeyValueInVarErrorIfAlreadyExistingNow(const SALOME::ByteVec& key, const SALOME::ByteVec& value);
public:
- void prepareRollBackInCaseOfFailure();
- void perform();
- void rollBack();
- void notify();
+ void prepareRollBackInCaseOfFailure() override;
+ void perform() override;
+ void rollBack() override;
+ void notify() override;
};
}