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;
}
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);
}
void storage::File::initialize (dbos::Loader& loader)
- throw (RuntimeException, dbms::DatabaseException)
+ noexcept(false)
{
File::Loader& dbLoader = static_cast <File::Loader&> (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 ();
}
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 ();
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 ();