glite::jdl::ExtractedAd Class Reference

#include <src/requestad/extractfiles.h>


Detailed Description

ExtractedAd represent all the extracted files for a certain job/node/dag etc each FilesAd instance can have recoursively children of any kind.


Constructors/Destructors/Copy

 ExtractedAd ()
 Default Constructor.
 ExtractedAd (const ExtractedAd &jobad)
 Copy Constructor.
virtual void operator= (const ExtractedAd &extractedAd)
 Operator "=" performs a deep copy of the instance.
virtual ~ExtractedAd () throw ()
 Default Destructor.
ExtractedAdCopy ()
 Deep copy the instance, including all its internal pointers.
static void ExtractedAdCopy (const ExtractedAd &source, ExtractedAd *dest)
 Static method: Copy Constructor.

SET/ADD Methods

void setNodeName (const std::string &nodeName)
 Set the nodeName for the current instance.
void setNodeName (const std::string &nodeName, const std::string &jobid)
 Set the nodeName for the specified jobid if present, raises exception otherwise.
void setJobId (const std::string &jobid)
 Set the job id for the current instance.
void setJobId (const std::string &nodeName, const std::string &jobid)
 Set the jobid for the specified nodeName if present, raises exception otherwise.
void setFiles (const std::vector< FileAd > &files)
 Set the files for the current instance.
void addFileAd (const FileAd &file)
 Add a single File.
void addFileAd (const std::string &path)
 Add a single File.
void addNode (ExtractedAd *extracted)
 Add a new Node to the children of the instance.
static void setMaxTotalSize (unsigned int maxTotalSize)
 static method: set the max possible size for the total of files contained inside instance

Public Member Functions

GET Methods
const std::string getNodeName ()
 Retrieve the name of the node (if the instance represents a node).
const std::string getJobId ()
 Retrieve the jobid.
const std::vector< FileAdgetFiles ()
 Retrieve only the files listed (without computing children files).
unsigned int getTotalSize ()
 Retrieve the total amount of size for files listed in the whole instance (computing children files too).
unsigned long getMaxJobFileSize ()
 Retrieve the highest file size from the ones listed in the whole instance (computing children files too).
ExtractedAdgetNode (const std::string &nodeName)
 Retrieve extracted instance for a specified node if present, raises exception otherwise.
ExtractedAdgetJobId (const std::string &jobid)
 Retrieve extracted instance for a specified jobid if present, raises exception otherwise.
std::vector< ExtractedAd * > getChildren ()
 Retrieve all children ExtractedAd for this instance, empty vector if no children found.
const std::vector< FileAdgetNodeNameFiles (const std::string &nodeName)
 Retrieve all files for a specified node if present, raises exception otherwise.
const std::vector< FileAdgetJobIdFiles (const std::string &jobid)
 Retrieve all files for a specified node if present, raises exception otherwise.
bool hasFiles ()
 Determine whether the instance or its children contain at least one file.


Constructor & Destructor Documentation

glite::jdl::ExtractedAd::ExtractedAd (  ) 

Default Constructor.

glite::jdl::ExtractedAd::ExtractedAd ( const ExtractedAd jobad  ) 

Copy Constructor.

virtual glite::jdl::ExtractedAd::~ExtractedAd (  )  throw () [inline, virtual]

Default Destructor.


Member Function Documentation

void glite::jdl::ExtractedAd::addFileAd ( const std::string &  path  ) 

Add a single File.

Parameters:
path the path of the file to be added

void glite::jdl::ExtractedAd::addFileAd ( const FileAd file  ) 

Add a single File.

Parameters:
file the file to be added

void glite::jdl::ExtractedAd::addNode ( ExtractedAd extracted  ) 

Add a new Node to the children of the instance.

Parameters:
extracted the ExtractedAd node to be added

ExtractedAd* glite::jdl::ExtractedAd::Copy (  ) 

Deep copy the instance, including all its internal pointers.

This has to be done when the copied instance is supposed to survive outside the executing scope

Returns:
the identical copy of the instance, with new allocated memory

static void glite::jdl::ExtractedAd::ExtractedAdCopy ( const ExtractedAd source,
ExtractedAd dest 
) [static]

Static method: Copy Constructor.

Parameters:
source the instance to be copied
dest the pointer which will be filled with source values

std::vector<ExtractedAd*> glite::jdl::ExtractedAd::getChildren (  ) 

Retrieve all children ExtractedAd for this instance, empty vector if no children found.

Returns:
a vector containing all pointers to the instance ExtractedAd children

const std::vector<FileAd> glite::jdl::ExtractedAd::getFiles (  ) 

Retrieve only the files listed (without computing children files).

Returns:
a vector containig all FilesAd listed

ExtractedAd* glite::jdl::ExtractedAd::getJobId ( const std::string &  jobid  ) 

Retrieve extracted instance for a specified jobid if present, raises exception otherwise.

Parameters:
jobid the value of the jobid to be retrieved
Returns:
a pointer to the desired jobid ExtractedAd instance

const std::string glite::jdl::ExtractedAd::getJobId (  ) 

Retrieve the jobid.

Returns:
the jobid string representation, empty string if not set

const std::vector<FileAd> glite::jdl::ExtractedAd::getJobIdFiles ( const std::string &  jobid  ) 

Retrieve all files for a specified node if present, raises exception otherwise.

Parameters:
jobid the value of the jobid to be retrieved
Returns:
a pointer to the desired node ExtractedAd instance

unsigned long glite::jdl::ExtractedAd::getMaxJobFileSize (  ) 

Retrieve the highest file size from the ones listed in the whole instance (computing children files too).

Returns:
the size (in Kb)

ExtractedAd* glite::jdl::ExtractedAd::getNode ( const std::string &  nodeName  ) 

Retrieve extracted instance for a specified node if present, raises exception otherwise.

Parameters:
nodeName the value of the node to be retrieved
Returns:
a pointer to the desired node ExtractedAd instance

const std::string glite::jdl::ExtractedAd::getNodeName (  ) 

Retrieve the name of the node (if the instance represents a node).

Returns:
the name of the node, empty string if not set

const std::vector<FileAd> glite::jdl::ExtractedAd::getNodeNameFiles ( const std::string &  nodeName  ) 

Retrieve all files for a specified node if present, raises exception otherwise.

Parameters:
nodeName the value of the node to be retrieved
Returns:
a pointer to the desired node ExtractedAd instance

unsigned int glite::jdl::ExtractedAd::getTotalSize (  ) 

Retrieve the total amount of size for files listed in the whole instance (computing children files too).

Returns:
the size (in Kb)

bool glite::jdl::ExtractedAd::hasFiles (  ) 

Determine whether the instance or its children contain at least one file.

Returns:
true when at least one file has been specified inside the instance or its children, false otherwise

virtual void glite::jdl::ExtractedAd::operator= ( const ExtractedAd extractedAd  )  [virtual]

Operator "=" performs a deep copy of the instance.

Parameters:
extractedAd the source instance to be copied

void glite::jdl::ExtractedAd::setFiles ( const std::vector< FileAd > &  files  ) 

Set the files for the current instance.

Parameters:
files the vector of files for the instance

void glite::jdl::ExtractedAd::setJobId ( const std::string &  nodeName,
const std::string &  jobid 
)

Set the jobid for the specified nodeName if present, raises exception otherwise.

Parameters:
jobid the value of the jobid to be set
nodeName the name of the Node where to insert the jobid

void glite::jdl::ExtractedAd::setJobId ( const std::string &  jobid  ) 

Set the job id for the current instance.

Parameters:
jobid the value of the job id to be set

static void glite::jdl::ExtractedAd::setMaxTotalSize ( unsigned int  maxTotalSize  )  [static]

static method: set the max possible size for the total of files contained inside instance

Parameters:
maxTotalSize the value (in Kb) of max total size of files contained

void glite::jdl::ExtractedAd::setNodeName ( const std::string &  nodeName,
const std::string &  jobid 
)

Set the nodeName for the specified jobid if present, raises exception otherwise.

Parameters:
nodeName the value of the node to be set
jobid the jobid of the Node where to set the node name

void glite::jdl::ExtractedAd::setNodeName ( const std::string &  nodeName  ) 

Set the nodeName for the current instance.

Parameters:
nodeName the value of the node to be set


The documentation for this class was generated from the following file:
Generated on Wed May 16 15:17:10 2012 for glite-jdl-api-cpp-3.2.5 by  doxygen 1.4.7