Commit 26b3dc2b authored by Steven Murray's avatar Steven Murray
Browse files

Removed ArchiveFileItorImpl.?pp and DeletedArchiveFileItorImpl.?pp

parent 69946b7d
......@@ -17,7 +17,7 @@
*/
#include "catalogue/ArchiveFileItor.hpp"
#include "catalogue/ArchiveFileItorImpl.hpp"
#include "catalogue/CatalogueItorImpl.hpp"
#include "common/exception/Exception.hpp"
namespace cta {
......@@ -33,7 +33,7 @@ ArchiveFileItor::ArchiveFileItor():
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
ArchiveFileItor::ArchiveFileItor(ArchiveFileItorImpl *const impl):
ArchiveFileItor::ArchiveFileItor(ArchiveFileItor::Impl *const impl):
m_impl(impl) {
if(nullptr == impl) {
throw exception::Exception(std::string(__FUNCTION__) + " failed: Pointer to implementation object is null");
......
......@@ -18,16 +18,12 @@
#pragma once
#include "catalogue/CatalogueItorImpl.hpp"
#include "common/dataStructures/ArchiveFile.hpp"
namespace cta {
namespace catalogue {
/**
* Forward declaration.
*/
class ArchiveFileItorImpl;
/**
* A wrapper around an object that iterators over a list of archive files.
*
......@@ -37,6 +33,8 @@ class ArchiveFileItorImpl;
class ArchiveFileItor {
public:
typedef CatalogueItorImpl<common::dataStructures::ArchiveFile> Impl;
/**
* Constructor.
*/
......@@ -47,7 +45,7 @@ public:
*
* @param impl The object actually implementing this iterator.
*/
ArchiveFileItor(ArchiveFileItorImpl *const impl);
ArchiveFileItor(Impl *const impl);
/**
* Deletion of copy constructor.
......@@ -91,7 +89,7 @@ private:
/**
* The object actually implementing this iterator.
*/
ArchiveFileItorImpl *m_impl;
Impl *m_impl;
}; // class ArchiveFileItor
......
/*
* The CERN Tape Archive (CTA) project
* Copyright (C) 2015 CERN
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "catalogue/ArchiveFileItorImpl.hpp"
namespace cta {
namespace catalogue {
//------------------------------------------------------------------------------
// destructor
//------------------------------------------------------------------------------
ArchiveFileItorImpl::~ArchiveFileItorImpl() {
}
} // namespace catalogue
} // namespace cta
/*
* The CERN Tape Archive (CTA) project
* Copyright (C) 2015 CERN
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "common/dataStructures/ArchiveFile.hpp"
namespace cta {
namespace catalogue {
/**
* Abstract class defining the interface to an iterator over a list of archive
* files.
*/
class ArchiveFileItorImpl {
public:
/**
* Destructor.
*/
virtual ~ArchiveFileItorImpl() = 0;
/**
* Returns true if a call to next would return another archive file.
*/
virtual bool hasMore() = 0;
/**
* Returns the next archive or throws an exception if there isn't one.
*/
virtual common::dataStructures::ArchiveFile next() = 0;
}; // class ArchiveFileItorImpl
} // namespace catalogue
} // namespace cta
......@@ -30,14 +30,12 @@ set (CATALOGUE_LIB_SRC_FILES
ArchiveFileBuilder.cpp
ArchiveFileRow.cpp
ArchiveFileItor.cpp
ArchiveFileItorImpl.cpp
Catalogue.cpp
CatalogueFactory.cpp
CatalogueFactoryFactory.cpp
CatalogueSchema.cpp
CmdLineTool.cpp
DeletedArchiveFileItor.cpp
DeletedArchiveFileItorImpl.cpp
InMemoryCatalogue.cpp
InMemoryCatalogueFactory.cpp
MysqlCatalogue.cpp
......
......@@ -17,7 +17,6 @@
*/
#include "DeletedArchiveFileItor.hpp"
#include "DeletedArchiveFileItorImpl.hpp"
namespace cta {
......@@ -34,7 +33,7 @@ DeletedArchiveFileItor::DeletedArchiveFileItor():
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
DeletedArchiveFileItor::DeletedArchiveFileItor(DeletedArchiveFileItorImpl *const impl):
DeletedArchiveFileItor::DeletedArchiveFileItor(DeletedArchiveFileItor::Impl *const impl):
m_impl(impl) {
if(nullptr == impl) {
throw exception::Exception(std::string(__FUNCTION__) + " failed: Pointer to implementation object is null");
......
......@@ -19,15 +19,16 @@
#pragma once
#include "common/dataStructures/DeletedArchiveFile.hpp"
#include "catalogue/CatalogueItorImpl.hpp"
namespace cta {
namespace catalogue {
class DeletedArchiveFileItorImpl;
class DeletedArchiveFileItor {
public:
typedef CatalogueItorImpl<common::dataStructures::DeletedArchiveFile> Impl;
/**
* Constructor.
*/
......@@ -38,7 +39,7 @@ public:
*
* @param impl The object actually implementing this iterator.
*/
DeletedArchiveFileItor(DeletedArchiveFileItorImpl *const impl);
DeletedArchiveFileItor(Impl *const impl);
/**
* Deletion of copy constructor.
......@@ -82,7 +83,7 @@ private:
/**
* The object actually implementing this iterator.
*/
DeletedArchiveFileItorImpl *m_impl;
Impl *m_impl;
};
}}
/*
* The CERN Tape Archive (CTA) project
* Copyright (C) 2019 CERN
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "DeletedArchiveFileItorImpl.hpp"
namespace cta {
namespace catalogue {
//------------------------------------------------------------------------------
// destructor
//------------------------------------------------------------------------------
DeletedArchiveFileItorImpl::~DeletedArchiveFileItorImpl() {
}
}}
\ No newline at end of file
/*
* The CERN Tape Archive (CTA) project
* Copyright (C) 2019 CERN
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "common/dataStructures/DeletedArchiveFile.hpp"
namespace cta {
namespace catalogue {
/**
* Abstract class defining the interface to an iterator over a list of archive
* files.
*/
class DeletedArchiveFileItorImpl {
public:
/**
* Destructor.
*/
virtual ~DeletedArchiveFileItorImpl() = 0;
/**
* Returns true if a call to next would return another archive file.
*/
virtual bool hasMore() = 0;
/**
* Returns the next archive or throws an exception if there isn't one.
*/
virtual common::dataStructures::DeletedArchiveFile next() = 0;
}; // class DeletedArchiveFileItorImpl
}}
......@@ -19,7 +19,6 @@
#pragma once
#include "catalogue/ArchiveFileBuilder.hpp"
#include "catalogue/ArchiveFileItorImpl.hpp"
#include "common/log/Logger.hpp"
#include "rdbms/ConnPool.hpp"
#include "rdbms/Stmt.hpp"
......@@ -33,7 +32,7 @@ namespace catalogue {
* RdbmsCatalogue::getArchiveFilesForRepack() implementation of
* ArchiveFileItorImpl.
*/
class RdbmsCatalogueGetArchiveFilesForRepackItor: public ArchiveFileItorImpl {
class RdbmsCatalogueGetArchiveFilesForRepackItor: public ArchiveFileItor::Impl {
public:
/**
......
......@@ -19,7 +19,6 @@
#pragma once
#include "catalogue/ArchiveFileBuilder.hpp"
#include "catalogue/ArchiveFileItorImpl.hpp"
#include "catalogue/TapeFileSearchCriteria.hpp"
#include "common/dataStructures/ArchiveFile.hpp"
#include "common/log/Logger.hpp"
......@@ -33,7 +32,7 @@ namespace catalogue {
/**
* RdbmsCatalogue::getArchiveFiles() implementation of ArchiveFileItorImpl.
*/
class RdbmsCatalogueGetArchiveFilesItor: public ArchiveFileItorImpl {
class RdbmsCatalogueGetArchiveFilesItor: public ArchiveFileItor::Impl {
public:
/**
......
......@@ -18,20 +18,20 @@
#pragma once
#include "DeletedArchiveFileItorImpl.hpp"
#include "catalogue/ArchiveFileBuilder.hpp"
#include "catalogue/DeletedArchiveFileItor.hpp"
#include "catalogue/TapeFileSearchCriteria.hpp"
#include "common/dataStructures/DeletedArchiveFile.hpp"
#include "common/log/Logger.hpp"
#include "rdbms/ConnPool.hpp"
#include "rdbms/Stmt.hpp"
#include "rdbms/Rset.hpp"
#include "TapeFileSearchCriteria.hpp"
#include "ArchiveFileBuilder.hpp"
#include "common/dataStructures/DeletedArchiveFile.hpp"
namespace cta {
namespace catalogue {
class RdbmsCatalogueGetDeletedArchiveFilesItor: public DeletedArchiveFileItorImpl {
class RdbmsCatalogueGetDeletedArchiveFilesItor: public DeletedArchiveFileItor::Impl {
public:
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment