| 1 | /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2 | |
| 3 | Module: FGJSBBase.cpp |
| 4 | Author: Jon S. Berndt |
| 5 | Date started: 07/01/01 |
| 6 | Purpose: Encapsulates the JSBBase object |
| 7 | |
| 8 | ------------- Copyright (C) 2001 Jon S. Berndt ([email protected]) ------------- |
| 9 | |
| 10 | This program is free software; you can redistribute it and/or modify it under |
| 11 | the terms of the GNU Lesser General Public License as published by the Free |
| 12 | Software Foundation; either version 2 of the License, or (at your option) any |
| 13 | later version. |
| 14 | |
| 15 | This program is distributed in the hope that it will be useful, but WITHOUT |
| 16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 17 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
| 18 | details. |
| 19 | |
| 20 | You should have received a copy of the GNU Lesser General Public License along |
| 21 | with this program; if not, write to the Free Software Foundation, Inc., 59 |
| 22 | Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 23 | |
| 24 | Further information about the GNU Lesser General Public License can also be |
| 25 | found on the world wide web at http://www.gnu.org. |
| 26 | |
| 27 | FUNCTIONAL DESCRIPTION |
| 28 | -------------------------------------------------------------------------------- |
| 29 | |
| 30 | HISTORY |
| 31 | -------------------------------------------------------------------------------- |
| 32 | 07/01/01 JSB Created |
| 33 | |
| 34 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 35 | INCLUDES |
| 36 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ |
| 37 | |
| 38 | #include "FGJSBBase.h" |
| 39 | #include "models/FGAtmosphere.h" |
| 40 | |
| 41 | using namespace std; |
| 42 | |
| 43 | namespace JSBSim { |
| 44 | |
| 45 | /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 46 | CLASS IMPLEMENTATION |
| 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ |
| 48 | |
| 49 | #ifndef _MSC_VER |
| 50 | char FGJSBBase::highint[5] = {27, '[', '1', 'm', '\0' }; |
| 51 | char FGJSBBase::halfint[5] = {27, '[', '2', 'm', '\0' }; |
| 52 | char FGJSBBase::normint[6] = {27, '[', '2', '2', 'm', '\0' }; |
| 53 | char FGJSBBase::reset[5] = {27, '[', '0', 'm', '\0' }; |
| 54 | char FGJSBBase::underon[5] = {27, '[', '4', 'm', '\0' }; |
| 55 | char FGJSBBase::underoff[6] = {27, '[', '2', '4', 'm', '\0' }; |
| 56 | char FGJSBBase::fgblue[6] = {27, '[', '3', '4', 'm', '\0' }; |
| 57 | char FGJSBBase::fgcyan[6] = {27, '[', '3', '6', 'm', '\0' }; |
| 58 | char FGJSBBase::fgred[6] = {27, '[', '3', '1', 'm', '\0' }; |
| 59 | char FGJSBBase::fggreen[6] = {27, '[', '3', '2', 'm', '\0' }; |
| 60 | char FGJSBBase::fgdef[6] = {27, '[', '3', '9', 'm', '\0' }; |
| 61 | #else |
| 62 | char FGJSBBase::highint[5] = {'\0' }; |
| 63 | char FGJSBBase::halfint[5] = {'\0' }; |
| 64 | char FGJSBBase::normint[6] = {'\0' }; |
| 65 | char FGJSBBase::reset[5] = {'\0' }; |
| 66 | char FGJSBBase::underon[5] = {'\0' }; |
| 67 | char FGJSBBase::underoff[6] = {'\0' }; |
| 68 | char FGJSBBase::fgblue[6] = {'\0' }; |
| 69 | char FGJSBBase::fgcyan[6] = {'\0' }; |
| 70 | char FGJSBBase::fgred[6] = {'\0' }; |
| 71 | char FGJSBBase::fggreen[6] = {'\0' }; |
| 72 | char FGJSBBase::fgdef[6] = {'\0' }; |
| 73 | #endif |
| 74 | |
| 75 | const string FGJSBBase::needed_cfg_version = "2.0"; |
| 76 | const string FGJSBBase::JSBSim_version = JSBSIM_VERSION " " __DATE__ " " __TIME__ ; |
| 77 | |
| 78 | short FGJSBBase::debug_lvl = 1; |
| 79 | |
| 80 | //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 81 | |
| 82 | void FGJSBBase::disableHighLighting(void) |
| 83 | { |
| 84 | highint[0]='\0'; |
| 85 | halfint[0]='\0'; |
| 86 | normint[0]='\0'; |
| 87 | reset[0]='\0'; |
| 88 | underon[0]='\0'; |
| 89 | underoff[0]='\0'; |
| 90 | fgblue[0]='\0'; |
| 91 | fgcyan[0]='\0'; |
| 92 | fgred[0]='\0'; |
| 93 | fggreen[0]='\0'; |
| 94 | fgdef[0]='\0'; |
| 95 | } |
| 96 | |
| 97 | //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 98 | |
| 99 | string FGJSBBase::CreateIndexedPropertyName(const string& Property, int index) |
| 100 | { |
| 101 | ostringstream buf; |
| 102 | buf << Property << '[' << index << ']'; |
| 103 | return buf.str(); |
| 104 | } |
| 105 | //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 106 | |
| 107 | } // namespace JSBSim |
| 108 |