Commit ce2add03 authored by Daniele Kruse's avatar Daniele Kruse
Browse files

Removed some more tapegateway structures

parent d82aaf30
/**** This file has been autogenerated by gencastor from Umbrello UML model ***/
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
// Include Files
#include "castor/Constants.hpp"
#include "castor/IObject.hpp"
#include "castor/ObjectSet.hpp"
#include "castor/tape/tapegateway/FileErrorReportStruct.hpp"
#include "castor/tape/tapegateway/FileMigratedNotificationStruct.hpp"
#include "castor/tape/tapegateway/FileMigrationReportList.hpp"
#include "castor/tape/tapegateway/GatewayMessage.hpp"
#include "osdep.h"
#include <iostream>
#include <string>
#include <vector>
//------------------------------------------------------------------------------
// Constructor
//------------------------------------------------------------------------------
castor::tape::tapegateway::FileMigrationReportList::FileMigrationReportList() throw() :
GatewayMessage(),
m_fseqSet(false),
m_fseq(0),
m_id(0) {
}
//------------------------------------------------------------------------------
// Destructor
//------------------------------------------------------------------------------
castor::tape::tapegateway::FileMigrationReportList::~FileMigrationReportList() throw() {
for (unsigned int i = 0; i < m_successfulMigrationsVector.size(); i++) {
m_successfulMigrationsVector[i]->setFileMigrationReportList(0);
delete m_successfulMigrationsVector[i];
}
m_successfulMigrationsVector.clear();
for (unsigned int i = 0; i < m_failedMigrationsVector.size(); i++) {
m_failedMigrationsVector[i]->setFileMigrationReportList(0);
delete m_failedMigrationsVector[i];
}
m_failedMigrationsVector.clear();
}
//------------------------------------------------------------------------------
// print
//------------------------------------------------------------------------------
void castor::tape::tapegateway::FileMigrationReportList::print(std::ostream& stream,
std::string indent,
castor::ObjectSet& alreadyPrinted) const {
stream << indent << "[# FileMigrationReportList #]" << std::endl;
if (alreadyPrinted.find(this) != alreadyPrinted.end()) {
// Circular dependency, this object was already printed
stream << indent << "Back pointer, see above" << std::endl;
return;
}
// Call print on the parent class(es)
this->GatewayMessage::print(stream, indent, alreadyPrinted);
// Output of all members
stream << indent << "fseqSet : " << (m_fseqSet ? "Yes" : "No") << std::endl;
stream << indent << "fseq : " << m_fseq << std::endl;
stream << indent << "id : " << m_id << std::endl;
alreadyPrinted.insert(this);
{
stream << indent << "SuccessfulMigrations : " << std::endl;
int i;
std::vector<FileMigratedNotificationStruct*>::const_iterator it;
for (it = m_successfulMigrationsVector.begin(), i = 0;
it != m_successfulMigrationsVector.end();
it++, i++) {
stream << indent << " " << i << " :" << std::endl;
(*it)->print(stream, indent + " ", alreadyPrinted);
}
}
{
stream << indent << "FailedMigrations : " << std::endl;
int i;
std::vector<FileErrorReportStruct*>::const_iterator it;
for (it = m_failedMigrationsVector.begin(), i = 0;
it != m_failedMigrationsVector.end();
it++, i++) {
stream << indent << " " << i << " :" << std::endl;
(*it)->print(stream, indent + " ", alreadyPrinted);
}
}
}
//------------------------------------------------------------------------------
// print
//------------------------------------------------------------------------------
void castor::tape::tapegateway::FileMigrationReportList::print() const {
castor::ObjectSet alreadyPrinted;
print(std::cout, "", alreadyPrinted);
}
//------------------------------------------------------------------------------
// TYPE
//------------------------------------------------------------------------------
int castor::tape::tapegateway::FileMigrationReportList::TYPE() {
return OBJ_FileMigrationReportList;
}
//------------------------------------------------------------------------------
// type
//------------------------------------------------------------------------------
int castor::tape::tapegateway::FileMigrationReportList::type() const {
return TYPE();
}
//------------------------------------------------------------------------------
// clone
//------------------------------------------------------------------------------
castor::IObject* castor::tape::tapegateway::FileMigrationReportList::clone() {
return new FileMigrationReportList(*this);
}
/**** This file has been autogenerated by gencastor from Umbrello UML model ***/
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
// Include Files
#include "castor/tape/tapegateway/GatewayMessage.hpp"
#include <iostream>
#include <shift/osdep.h>
#include <string>
#include <vector>
namespace castor {
// Forward declarations
class ObjectSet;
class IObject;
namespace tape {
namespace tapegateway {
// Forward declarations
class FileMigratedNotificationStruct;
class FileErrorReportStruct;
/**
* class FileMigrationReportList
*/
class FileMigrationReportList : public virtual GatewayMessage {
public:
/**
* Empty Constructor
*/
FileMigrationReportList() throw();
/**
* Empty Destructor
*/
virtual ~FileMigrationReportList() throw();
/**
* Outputs this object in a human readable format
* @param stream The stream where to print this object
* @param indent The indentation to use
* @param alreadyPrinted The set of objects already printed.
* This is to avoid looping when printing circular dependencies
*/
virtual void print(std::ostream& stream,
std::string indent,
castor::ObjectSet& alreadyPrinted) const;
/**
* Outputs this object in a human readable format
*/
virtual void print() const;
/**
* Gets the type of this kind of objects
*/
static int TYPE();
/********************************************/
/* Implementation of IObject abstract class */
/********************************************/
/**
* Gets the type of the object
*/
virtual int type() const;
/**
* virtual method to clone any object
*/
virtual castor::IObject* clone();
/*********************************/
/* End of IObject abstract class */
/*********************************/
/**
* Get the value of m_fseqSet
* @return the value of m_fseqSet
*/
bool fseqSet() const {
return m_fseqSet;
}
/**
* Set the value of m_fseqSet
* @param new_var the new value of m_fseqSet
*/
void setFseqSet(bool new_var) {
m_fseqSet = new_var;
}
/**
* Get the value of m_fseq
* @return the value of m_fseq
*/
int fseq() const {
return m_fseq;
}
/**
* Set the value of m_fseq
* @param new_var the new value of m_fseq
*/
void setFseq(int new_var) {
m_fseq = new_var;
}
/**
* Get the value of m_id
* The id of this object
* @return the value of m_id
*/
u_signed64 id() const {
return m_id;
}
/**
* Set the value of m_id
* The id of this object
* @param new_var the new value of m_id
*/
void setId(u_signed64 new_var) {
m_id = new_var;
}
/**
* Add a FileMigratedNotificationStruct* object to the m_successfulMigrationsVector
* list
*/
void addSuccessfulMigrations(FileMigratedNotificationStruct* add_object) {
m_successfulMigrationsVector.push_back(add_object);
}
/**
* Remove a FileMigratedNotificationStruct* object from
* m_successfulMigrationsVector
*/
void removeSuccessfulMigrations(FileMigratedNotificationStruct* remove_object) {
for (unsigned int i = 0; i < m_successfulMigrationsVector.size(); i++) {
FileMigratedNotificationStruct* item = m_successfulMigrationsVector[i];
if (item == remove_object) {
std::vector<FileMigratedNotificationStruct*>::iterator it = m_successfulMigrationsVector.begin() + i;
m_successfulMigrationsVector.erase(it);
return;
}
}
}
/**
* Get the list of FileMigratedNotificationStruct* objects held by
* m_successfulMigrationsVector
* @return list of FileMigratedNotificationStruct* objects held by
* m_successfulMigrationsVector
*/
std::vector<FileMigratedNotificationStruct*>& successfulMigrations() {
return m_successfulMigrationsVector;
}
/**
* Add a FileErrorReportStruct* object to the m_failedMigrationsVector list
*/
void addFailedMigrations(FileErrorReportStruct* add_object) {
m_failedMigrationsVector.push_back(add_object);
}
/**
* Remove a FileErrorReportStruct* object from m_failedMigrationsVector
*/
void removeFailedMigrations(FileErrorReportStruct* remove_object) {
for (unsigned int i = 0; i < m_failedMigrationsVector.size(); i++) {
FileErrorReportStruct* item = m_failedMigrationsVector[i];
if (item == remove_object) {
std::vector<FileErrorReportStruct*>::iterator it = m_failedMigrationsVector.begin() + i;
m_failedMigrationsVector.erase(it);
return;
}
}
}
/**
* Get the list of FileErrorReportStruct* objects held by m_failedMigrationsVector
* @return list of FileErrorReportStruct* objects held by m_failedMigrationsVector
*/
std::vector<FileErrorReportStruct*>& failedMigrations() {
return m_failedMigrationsVector;
}
private:
bool m_fseqSet;
int m_fseq;
/// The id of this object
u_signed64 m_id;
std::vector<FileMigratedNotificationStruct*> m_successfulMigrationsVector;
std::vector<FileErrorReportStruct*> m_failedMigrationsVector;
}; /* end of class FileMigrationReportList */
} /* end of namespace tapegateway */
} /* end of namespace tape */
} /* end of namespace castor */
/**** This file has been autogenerated by gencastor from Umbrello UML model ***/
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
// Include Files
#include "castor/Constants.hpp"
#include "castor/IObject.hpp"
#include "castor/ObjectSet.hpp"
#include "castor/tape/tapegateway/FileErrorReportStruct.hpp"
#include "castor/tape/tapegateway/FileRecallReportList.hpp"
#include "castor/tape/tapegateway/FileRecalledNotificationStruct.hpp"
#include "castor/tape/tapegateway/GatewayMessage.hpp"
#include "osdep.h"
#include <iostream>
#include <string>
#include <vector>
//------------------------------------------------------------------------------
// Constructor
//------------------------------------------------------------------------------
castor::tape::tapegateway::FileRecallReportList::FileRecallReportList() throw() :
GatewayMessage(),
m_id(0) {
}
//------------------------------------------------------------------------------
// Destructor
//------------------------------------------------------------------------------
castor::tape::tapegateway::FileRecallReportList::~FileRecallReportList() throw() {
for (unsigned int i = 0; i < m_successfulRecallsVector.size(); i++) {
m_successfulRecallsVector[i]->setFileRecallReportList(0);
delete m_successfulRecallsVector[i];
}
m_successfulRecallsVector.clear();
for (unsigned int i = 0; i < m_failedRecallsVector.size(); i++) {
m_failedRecallsVector[i]->setFileRecallReportList(0);
delete m_failedRecallsVector[i];
}
m_failedRecallsVector.clear();
}
//------------------------------------------------------------------------------
// print
//------------------------------------------------------------------------------
void castor::tape::tapegateway::FileRecallReportList::print(std::ostream& stream,
std::string indent,
castor::ObjectSet& alreadyPrinted) const {
stream << indent << "[# FileRecallReportList #]" << std::endl;
if (alreadyPrinted.find(this) != alreadyPrinted.end()) {
// Circular dependency, this object was already printed
stream << indent << "Back pointer, see above" << std::endl;
return;
}
// Call print on the parent class(es)
this->GatewayMessage::print(stream, indent, alreadyPrinted);
// Output of all members
stream << indent << "id : " << m_id << std::endl;
alreadyPrinted.insert(this);
{
stream << indent << "SuccessfulRecalls : " << std::endl;
int i;
std::vector<FileRecalledNotificationStruct*>::const_iterator it;
for (it = m_successfulRecallsVector.begin(), i = 0;
it != m_successfulRecallsVector.end();
it++, i++) {
stream << indent << " " << i << " :" << std::endl;
(*it)->print(stream, indent + " ", alreadyPrinted);
}
}
{
stream << indent << "FailedRecalls : " << std::endl;
int i;
std::vector<FileErrorReportStruct*>::const_iterator it;
for (it = m_failedRecallsVector.begin(), i = 0;
it != m_failedRecallsVector.end();
it++, i++) {
stream << indent << " " << i << " :" << std::endl;
(*it)->print(stream, indent + " ", alreadyPrinted);
}
}
}
//------------------------------------------------------------------------------
// print
//------------------------------------------------------------------------------
void castor::tape::tapegateway::FileRecallReportList::print() const {
castor::ObjectSet alreadyPrinted;
print(std::cout, "", alreadyPrinted);
}
//------------------------------------------------------------------------------
// TYPE
//------------------------------------------------------------------------------
int castor::tape::tapegateway::FileRecallReportList::TYPE() {
return OBJ_FileRecallReportList;
}
//------------------------------------------------------------------------------
// type
//------------------------------------------------------------------------------
int castor::tape::tapegateway::FileRecallReportList::type() const {
return TYPE();
}
//------------------------------------------------------------------------------
// clone
//------------------------------------------------------------------------------
castor::IObject* castor::tape::tapegateway::FileRecallReportList::clone() {
return new FileRecallReportList(*this);
}
/**** This file has been autogenerated by gencastor from Umbrello UML model ***/
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
// Include Files
#include "castor/tape/tapegateway/GatewayMessage.hpp"
#include <iostream>
#include <shift/osdep.h>
#include <string>
#include <vector>
namespace castor {
// Forward declarations
class ObjectSet;
class IObject;
namespace tape {
namespace tapegateway {
// Forward declarations
class FileRecalledNotificationStruct;
class FileErrorReportStruct;
/**
* class FileRecallReportList
*/
class FileRecallReportList : public virtual GatewayMessage {
public:
/**
* Empty Constructor
*/
FileRecallReportList() throw();
/**
* Empty Destructor
*/
virtual ~FileRecallReportList() throw();
/**
* Outputs this object in a human readable format
* @param stream The stream where to print this object
* @param indent The indentation to use
* @param alreadyPrinted The set of objects already printed.
* This is to avoid looping when printing circular dependencies
*/
virtual void print(std::ostream& stream,
std::string indent,
castor::ObjectSet& alreadyPrinted) const;
/**
* Outputs this object in a human readable format
*/
virtual void print() const;
/**
* Gets the type of this kind of objects
*/
static int TYPE();
/********************************************/
/* Implementation of IObject abstract class */
/********************************************/
/**
* Gets the type of the object
*/
virtual int type() const;