MTK++ Latest version: 0.2.0

copyright.h
Go to the documentation of this file.
00001 
00035 #ifndef COPYRIGHT_H
00036 #define COPYRIGHT_H
00037 #include "Utils/constants.h"
00038 
00039 #include <stdlib.h>
00040 #include <iostream>
00041 #include <string>
00042 #include <stdio.h>
00043 #include "config.h"
00044 
00045 namespace MTKpp
00046 {
00047 void copyright(std::ostream& os)
00048 {
00049     std::string outline = "                                                                              ";
00050     std::string MTK_NAME = PACKAGE_STRING;
00051 
00052     if (MTK_NAME.size() > outline.size()+2) {
00053       os << " Error in copyright: Program name is too long ... exiting " << std::endl;
00054       exit(0);
00055     }
00056 
00057     unsigned int s = outline.size() - MTK_NAME.size();
00058     int odd = 0;
00059     if (s % 2) {
00060       odd = 1;
00061       s--;
00062     }
00063     unsigned int w = s/2;
00064     std::string sub1 = outline.substr(0,w);
00065     std::string sub2 = outline.substr(0,w+odd);
00066     std::string sub = "|" + sub1 + MTK_NAME + sub2 + "|";
00067     if (sub.size() > 80) {
00068       os << " Error in copyright ... exiting " << std::endl;
00069       exit(0);
00070     }
00071 
00072     os << "+------------------------------------------------------------------------------+"
00073        << std::endl;
00074     os << "|____/\\/\\______/\\/\\__/\\/\\/\\/\\/\\/\\__/\\/\\____/\\/\\________________________________|"
00075        << std::endl;
00076     os << "|____/\\/\\/\\__/\\/\\/\\______/\\/\\______/\\/\\__/\\/\\________/\\/\\__________/\\/\\________|"
00077        << std::endl;
00078     os << "|____/\\/\\/\\/\\/\\/\\/\\______/\\/\\______/\\/\\/\\/\\______/\\/\\/\\/\\/\\/\\__/\\/\\/\\/\\/\\/\\____|"
00079        << std::endl;
00080     os << "|____/\\/\\__/\\__/\\/\\______/\\/\\______/\\/\\__/\\/\\________/\\/\\__________/\\/\\________|"
00081        << std::endl;
00082     os << "|____/\\/\\______/\\/\\______/\\/\\______/\\/\\____/\\/\\________________________________|"
00083        << std::endl;
00084     os << "+------------------------------------------------------------------------------+" << std::endl;
00085     os << "|                                                                              |" << std::endl;
00086     os << "|                                 ____    ____                                 |" << std::endl;
00087     os << "|                                /    \\  /    \\                                |" << std::endl;
00088     os << "|                               /      \\/      \\                               |" << std::endl;
00089     os << "|                               \\              /                               |" << std::endl;
00090     os << "|                                \\            /                                |" << std::endl;
00091     os << "|                                /            \\                                |" << std::endl;
00092     os << "|                               /              \\                               |" << std::endl;
00093     os << "|                               \\      /\\      /                               |" << std::endl;
00094     os << "|                                \\____/  \\____/                                |" << std::endl;
00095     os << "|                                                                              |" << std::endl;
00096     os << sub << std::endl;
00097     //os << "| MTK++ - C++ package of modeling libraries.                                   |" << std::endl;
00098     os << "|                                                                              |" << std::endl;
00099     os << "| Copyright (C) 2005-2010  (see AUTHORS file for a list of contributors)       |" << std::endl;
00100     os << "|                                                                              |" << std::endl;
00101     os << "| MTK++ is free software; you can redistribute it and/or modify                |" << std::endl;
00102     os << "| it under the terms of the GNU Lesser General Public License as published by  |" << std::endl;
00103     os << "| the Free Software Foundation; either version 3 of the License, or            |" << std::endl;
00104     os << "| (at your option) any later version.                                          |" << std::endl;
00105     os << "|                                                                              |" << std::endl;
00106     os << "| MTK++ is distributed in the hope that it will be useful,                     |" << std::endl;
00107     os << "| but WITHOUT ANY WARRANTY; without even the implied warranty of               |" << std::endl;
00108     os << "| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                |" << std::endl;
00109     os << "| GNU Lessser General Public License for more details.                         |" << std::endl;
00110     os << "|                                                                              |" << std::endl;
00111     os << "| You should have received a copy of the GNU Lesser General Public License     |" << std::endl;
00112     os << "| along with this program.  If not, see <http://www.gnu.org/licenses/>.        |" << std::endl;
00113     os << "|                                                                              |" << std::endl;
00114     os << "+------------------------------------------------------------------------------+" << std::endl;
00115     os << "|                                                                              |" << std::endl;
00116     os << "| This program uses the MTK++ package.                                         |" << std::endl;
00117     os << "|                                                                              |" << std::endl;
00118     os << "+------------------------------------------------------------------------------+" << std::endl;
00119 };
00120 
00121 } // namespace MTKpp
00122 
00123 #endif // COPYRIGHT_H

Generated on Fri Dec 23 2011 09:28:49 for MTK++ by Doxygen 1.7.5.1