a_library.cc

Go to the documentation of this file.
00001 ///
00002 /// \file       a_library.cc
00003 ///             ALX Library class based on CODSection class
00004 ///
00005 
00006 /*
00007     Copyright (C) 2010, Nicolas VIVIEN
00008     Copyright (C) 2005-2012, Net Direct Inc. (http://www.netdirect.ca/)
00009 
00010     This program is free software; you can redistribute it and/or modify
00011     it under the terms of the GNU General Public License as published by
00012     the Free Software Foundation; either version 2 of the License, or
00013     (at your option) any later version.
00014 
00015     This program is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00018 
00019     See the GNU General Public License in the COPYING file at the
00020     root directory of this project for more details.
00021 */
00022 
00023 #include <iostream>
00024 #include <fstream>
00025 #include <sstream>
00026 
00027 #include "a_library.h"
00028 #include "ios_state.h"
00029 
00030 
00031 namespace Barry {
00032 
00033 
00034 namespace ALX {
00035 
00036 
00037 Library::Library(void)
00038         : CODSection()
00039 {
00040 }
00041 
00042 
00043 Library::Library(const xmlpp::SaxParser::AttributeList& attrs)
00044         : CODSection(attrs)
00045 {
00046 }
00047 
00048 
00049 Library::~Library(void)
00050 {
00051 }
00052 
00053 
00054 void Library::Dump(std::ostream &os) const
00055 {
00056         ios_format_state state(os);
00057 
00058         os << "  Library " << name << " - " << version << std::endl;
00059         os << "    ID          : " << id << std::endl;
00060         os << "    Description : " << description << std::endl;
00061         os << "    Vendor      : " << vendor << std::endl;
00062         os << "    Copyright   : " << copyright << std::endl;
00063         os << "    Required    : " << (isRequired ? "Yes" : "No") << std::endl;
00064 
00065         std::vector<std::string>::const_iterator b = codfiles.begin(), e = codfiles.end();
00066 
00067         os << "    Files       : " << std::endl;
00068         for (; b != e; b++)
00069                 os << "        - " << directory << "/" << (*b) << std::endl;
00070 }
00071 
00072 
00073 } // namespace ALX
00074 
00075 } // namespace Barry
00076