pelican/output/src/DataBlobFile.cpp
/**
 * @details Constructs a DataBlobFile object.
 */
@details Constructs a DataBlobFile object.
@details Constructs a DataBlobFile object .
DataBlobFile::DataBlobFile(const ConfigNode& configNode)
    : AbstractOutputStream(configNode), _blobType("")
{
    const QDomElement& node = configNode.getDomElement();
    QDomNodeList list = node.elementsByTagName("file");
    for (int i = 0; i < list.size(); ++i) {
        QDomElement element = list.at(i).toElement();
        if (element.hasAttribute("name")) {
            QString type;
            if (element.hasAttribute("type")) {
                type = element.attribute("type");
            }
            else { type = "homogeneous"; }
            if( type == "homogeneous" ) {
                addFile( element.attribute("name"), DataBlobFileType::Homogeneous );
            }
            else if( type == "heterogeneous" ) {
                addFile( element.attribute("name"), DataBlobFileType::Heterogeneous );
            }
            else {
                throw( QString("DataBlobFile: unknown file type specified for file %1:")
                        .arg(element.attribute("name")) + type );
            }
        }
    }
}
DataBlobFile :: DataBlobFile ( const ConfigNode & configNode ) : AbstractOutputStream ( configNode ) , _blobType ( " " ) { const QDomElement & node = configNode . getDomElement ( ) ; QDomNodeList list = node . elementsByTagName ( " " ) ; for ( int i = 0 ; i < list . size ( ) ; ++ i ) { QDomElement element = list . at ( i ) . toElement ( ) ; if ( element . hasAttribute ( " " ) ) { QString type ; if ( element . hasAttribute ( " " ) ) { type = element . attribute ( " " ) ; } else { type = " " ; } if ( type == " " ) { addFile ( element . attribute ( " " ) , DataBlobFileType :: Homogeneous ) ; } else if ( type == " " ) { addFile ( element . attribute ( " " ) , DataBlobFileType :: Heterogeneous ) ; } else { throw ( QString ( " " ) . arg ( element . attribute ( " " ) ) + type ) ; } } } }
@details Constructs a DataBlobFile object.
@details Constructs a DataBlobFile object .
// Get the filename from the configuration node, and open it for output.