X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=example%2Fdbos%2Fworkdir%2Fstorage%2FFile.cpp;fp=example%2Fdbos%2Fworkdir%2Fstorage%2FFile.cpp;h=a9357de440801c22c331e127af5821128ebba623;hp=6a234303f2b5123750367d963773adcc829da6be;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/example/dbos/workdir/storage/File.cpp b/example/dbos/workdir/storage/File.cpp index 6a23430..a9357de 100644 --- a/example/dbos/workdir/storage/File.cpp +++ b/example/dbos/workdir/storage/File.cpp @@ -38,7 +38,7 @@ int storage::File::st_maxSize = 0; dbos_prepare_object (storage::File); void storage::File::setup (dbos::Repository& repository, const int maxSize) - throw (RuntimeException) + noexcept(false) { st_loader = new File::Loader (); st_maxSize = maxSize; @@ -52,7 +52,7 @@ void storage::File::setup (dbos::Repository& repository, const int maxSize) } storage::File* storage::File::instantiate (const filesystem::File* file) - throw (RuntimeException) + noexcept(false) { if (st_loader == NULL) throw RuntimeException ("storage::File::setup no ha sido invocado", ANNA_FILE_LOCATION); @@ -71,14 +71,14 @@ storage::File* storage::File::instantiate (const filesystem::File* file) } void storage::File::initialize (dbos::Loader& loader) - throw (RuntimeException, dbms::DatabaseException) + noexcept(false) { File::Loader& dbLoader = static_cast (loader); - + a_filesystemFile = dbLoader.getFile (); a_parent = Directory::instantiate (filesystem::Directory::down_cast (a_filesystemFile->getParent ())); a_inode = dbLoader.getINode (); - + LOGINFORMATION ( string msg ("storage::File::initialize | "); msg += asString (); @@ -87,18 +87,18 @@ void storage::File::initialize (dbos::Loader& loader) } void storage::File::destroy () - throw () -{ + +{ LOGINFORMATION ( string msg ("storage::File::destroy | "); msg += asString (); Logger::information (msg, ANNA_FILE_LOCATION); ); - Directory::release (a_parent); + Directory::release (a_parent); } string storage::File::asString () const - throw () + { std::string result ("storage::File { Name: "); result += a_filesystemFile->getPath (); @@ -106,25 +106,25 @@ string storage::File::asString () const return result += " }"; } -/* +/* * Transfiere la información del medio físico al primer nivel de C++. * Posteriormente será interpretada en storage::File::initialize */ -bool storage::File::Loader::load (dbms::Connection*, const dbos::StorageArea* ssaa) - throw (RuntimeException) +bool storage::File::Loader::load (dbms::Connection*, const dbos::StorageArea* ssaa) + noexcept(false) { a_inode = io::functions::getINode (a_filesystemFile->getPath ()); return true; } -dbos::Index storage::File::Loader::getIndex () const - throw () +dbos::Index storage::File::Loader::getIndex () const + { - return st_hash.calcule (a_filesystemFile->getPath ()); + return st_hash.calcule (a_filesystemFile->getPath ()); } string storage::File::Loader::asString () const - throw () + { std::string result ("storage::Loader::File { Name: "); result += a_filesystemFile->getPath ();