[Opal-commits] opal/src BlueprintManager.cpp,1.42,1.43 Portability.h,1.8,1.9 SConscript,1.20,1.21
Status: Inactive
Brought to you by:
tylerstreeter
|
From: tylerstreeter <tyl...@us...> - 2005-06-24 17:50:59
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27529/src Modified Files: BlueprintManager.cpp Portability.h SConscript Log Message: Put TinyXml source in with the OPAL source to make it easier to build for everyone. Index: SConscript =================================================================== RCS file: /cvsroot/opal/opal/src/SConscript,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** SConscript 18 Apr 2005 22:21:03 -0000 1.20 --- SConscript 24 Jun 2005 17:50:48 -0000 1.21 *************** *** 83,93 **** """) - # Add in XML source if desired - if env['XML']: - if env['debug'] == True: - env.Append(LIBS = ['tinyxmld']) - else: - env.Append(LIBS = ['tinyxml']) - objects = env.SharedObject(sources) --- 83,86 ---- Index: BlueprintManager.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/BlueprintManager.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** BlueprintManager.cpp 3 May 2005 15:55:53 -0000 1.42 --- BlueprintManager.cpp 24 Jun 2005 17:50:48 -0000 1.43 *************** *** 43,49 **** #include "VolumeSensorData.h" ! #ifdef OPAL_USE_XML ! #include <tinyxml/tinyxml.h> ! #endif namespace opal --- 43,47 ---- #include "VolumeSensorData.h" ! #include "external/tinyxml/tinyxml.h" namespace opal *************** *** 68,73 **** const std::string& filename) { - #ifdef OPAL_USE_XML - // Load the file. TiXmlDocument file; --- 66,69 ---- *************** *** 85,91 **** { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadFile: \ ! Missing root element in " << filename ! << ". Ignoring file." << std::endl; return; } --- 81,86 ---- { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadFile: Missing root element " ! << "in " << filename << ". Ignoring file." << std::endl; return; } *************** *** 155,159 **** // Finalized the Blueprint. bp.finalize(); - #endif } --- 150,153 ---- *************** *** 165,170 **** SolidData* data = new SolidData(); - #ifdef OPAL_USE_XML - TiXmlNode* paramNodePtr = NULL; --- 159,162 ---- *************** *** 317,321 **** } } ! #endif return data; } --- 309,313 ---- } } ! return data; } *************** *** 328,333 **** JointData* data = new JointData(); - #ifdef OPAL_USE_XML - TiXmlNode* paramNodePtr = NULL; --- 320,323 ---- *************** *** 613,617 **** } } ! #endif return data; } --- 603,607 ---- } } ! return data; } *************** *** 624,629 **** MotorData* data = NULL; - #ifdef OPAL_USE_XML - TiXmlNode* paramNodePtr = NULL; --- 614,617 ---- *************** *** 697,701 **** } } ! #endif return data; } --- 685,689 ---- } } ! return data; } *************** *** 709,714 **** AttractorMotorData* data = new AttractorMotorData(); - #ifdef OPAL_USE_XML - TiXmlNode* paramNodePtr = NULL; --- 697,700 ---- *************** *** 744,754 **** { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadAttractorMotor: Missing \ ! References element in " << data->name << " in " << filename << ". Ignoring the Motor." << std::endl; delete data; return NULL; } ! #endif return data; } --- 730,740 ---- { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadAttractorMotor: Missing " ! << "References element in " << data->name << " in " << filename << ". Ignoring the Motor." << std::endl; delete data; return NULL; } ! return data; } *************** *** 762,767 **** GearedMotorData* data = new GearedMotorData(); - #ifdef OPAL_USE_XML - TiXmlNode* paramNodePtr = NULL; --- 748,751 ---- *************** *** 777,784 **** { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadGearedMotor: Invalid \ ! value " << data->jointAxisNum << " for GearedMotor \ ! JointAxisNum parameter in " << filename ! << " will be ignored." << std::endl; data->jointAxisNum = 0; } --- 761,768 ---- { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadGearedMotor: Invalid " ! << "value " << data->jointAxisNum << " for " ! << "GearedMotor JointAxisNum parameter in " ! << filename << " will be ignored." << std::endl; data->jointAxisNum = 0; } *************** *** 822,832 **** { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadGearedMotor: Missing \ ! References element in " << data->name << " in " << filename << ". Ignoring the Motor." << std::endl; delete data; return NULL; } ! #endif return data; } --- 806,816 ---- { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadGearedMotor: Missing " ! << "References element in " << data->name << " in " << filename << ". Ignoring the Motor." << std::endl; delete data; return NULL; } ! return data; } *************** *** 840,845 **** ServoMotorData* data = new ServoMotorData(); - #ifdef OPAL_USE_XML - TiXmlNode* paramNodePtr = NULL; --- 824,827 ---- *************** *** 855,862 **** { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadGearedMotor: Invalid \ ! value " << data->jointAxisNum << " for GearedMotor \ ! JointAxisNum parameter in " << filename ! << " will be ignored." << std::endl; data->jointAxisNum = 0; } --- 837,844 ---- { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadGearedMotor: Invalid " ! << "value " << data->jointAxisNum << " for " ! << "GearedMotor JointAxisNum parameter in " ! << filename << " will be ignored." << std::endl; data->jointAxisNum = 0; } *************** *** 881,886 **** { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadServoMotor: Invalid \ ! Mode " << mode << " in " << data->name << " in " << filename << " will be ignored." << std::endl; --- 863,868 ---- { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadServoMotor: Invalid " ! << "Mode " << mode << " in " << data->name << " in " << filename << " will be ignored." << std::endl; *************** *** 933,943 **** { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadServoMotor: Missing \ ! References element in " << data->name << " in " << filename << ". Ignoring the Motor." << std::endl; delete data; return NULL; } ! #endif return data; } --- 915,925 ---- { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadServoMotor: Missing " ! << "References element in " << data->name << " in " << filename << ". Ignoring the Motor." << std::endl; delete data; return NULL; } ! return data; } *************** *** 951,956 **** SpringMotorData* data = new SpringMotorData(); - #ifdef OPAL_USE_XML - TiXmlNode* paramNodePtr = NULL; --- 933,936 ---- *************** *** 977,983 **** { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadSpringMotor: Invalid \ ! Mode " << mode << " in " << data->name << ! " in " << filename << " will be ignored." << std::endl; } --- 957,963 ---- { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadSpringMotor: Invalid " ! " Mode " << mode << " in " << data->name ! << " in " << filename << " will be ignored." << std::endl; } *************** *** 1079,1089 **** { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadSpringMotor: Missing \ ! References element in " << data->name << " in " << filename << ". Ignoring the Motor." << std::endl; delete data; return NULL; } ! #endif return data; } --- 1059,1069 ---- { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadSpringMotor: Missing " ! " References element in " << data->name << " in " << filename << ". Ignoring the Motor." << std::endl; delete data; return NULL; } ! return data; } *************** *** 1097,1102 **** ThrusterMotorData* data = new ThrusterMotorData(); - #ifdef OPAL_USE_XML - TiXmlNode* paramNodePtr = NULL; --- 1077,1080 ---- *************** *** 1143,1149 **** { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadThrusterMotor: Invalid \ ! Force type " << forceType << " in " << data->name << ! " in " << filename << " will be ignored." << std::endl; } --- 1121,1127 ---- { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadThrusterMotor: Invalid " ! << "Force type " << forceType << " in " << data->name ! << " in " << filename << " will be ignored." << std::endl; } *************** *** 1183,1193 **** { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadSolidMotor: Missing \ ! References element in " << data->name << " in " << filename << ". Ignoring the Motor." << std::endl; delete data; return NULL; } ! #endif return data; } --- 1161,1171 ---- { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadSolidMotor: Missing " ! << "References element in " << data->name << " in " << filename << ". Ignoring the Motor." << std::endl; delete data; return NULL; } ! return data; } *************** *** 1200,1205 **** SensorData* data = NULL; - #ifdef OPAL_USE_XML - TiXmlNode* paramNodePtr = NULL; --- 1178,1181 ---- *************** *** 1292,1296 **** data->solidBlueprintRefName = ""; } ! #endif return data; } --- 1268,1272 ---- data->solidBlueprintRefName = ""; } ! return data; } *************** *** 1304,1310 **** AccelerationSensorData* data = new AccelerationSensorData(); - #ifdef OPAL_USE_XML // Nothing special to load for AccelerationSensors. ! #endif return data; } --- 1280,1285 ---- AccelerationSensorData* data = new AccelerationSensorData(); // Nothing special to load for AccelerationSensors. ! return data; } *************** *** 1318,1323 **** InclineSensorData* data = new InclineSensorData(); - #ifdef OPAL_USE_XML - TiXmlNode* paramNodePtr = NULL; --- 1293,1296 ---- *************** *** 1334,1338 **** } - #endif return data; } --- 1307,1310 ---- *************** *** 1346,1351 **** RaycastSensorData* data = new RaycastSensorData(); - #ifdef OPAL_USE_XML - TiXmlNode* paramNodePtr = NULL; --- 1318,1321 ---- *************** *** 1377,1381 **** } - #endif return data; } --- 1347,1350 ---- *************** *** 1389,1395 **** VolumeSensorData* data = new VolumeSensorData(); - #ifdef OPAL_USE_XML // Nothing special to load for VolumeSensors. ! #endif return data; } --- 1358,1363 ---- VolumeSensorData* data = new VolumeSensorData(); // Nothing special to load for VolumeSensors. ! return data; } *************** *** 1402,1407 **** ShapeData* data = NULL; - #ifdef OPAL_USE_XML - std::string type = getAttributeString(nodePtr, "type"); --- 1370,1373 ---- *************** *** 1505,1509 **** } - #endif return data; } --- 1471,1474 ---- *************** *** 1512,1517 **** const TiXmlNode* nodePtr, const std::string& filename) { - #ifdef OPAL_USE_XML - // Loop over all Transform sub-elements. TiXmlNode* transformNodePtr = NULL; --- 1477,1480 ---- *************** *** 1579,1587 **** { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadOffset: Invalid \ ! transform type " << type << " in " << filename << std::endl; } } - #endif } --- 1542,1550 ---- { OPAL_LOGGER("warning") << ! "opal::BlueprintManager::loadOffset: Invalid " ! << "transform type " << type << " in " << filename ! << std::endl; } } } *************** *** 1589,1594 **** const std::string& name)const { - #ifdef OPAL_USE_XML - TiXmlElement* elementPtr = const_cast<TiXmlNode*>(nodePtr)->ToElement(); --- 1552,1555 ---- *************** *** 1608,1614 **** return (real)temp; } - #else - return 0; - #endif } --- 1569,1572 ---- *************** *** 1616,1621 **** const TiXmlNode* nodePtr, const std::string& name)const { - #ifdef OPAL_USE_XML - TiXmlElement* elementPtr = const_cast<TiXmlNode*>(nodePtr)->ToElement(); --- 1574,1577 ---- *************** *** 1635,1641 **** return temp; } - #else - return ""; - #endif } } --- 1591,1594 ---- Index: Portability.h =================================================================== RCS file: /cvsroot/opal/opal/src/Portability.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Portability.h 19 Apr 2005 14:20:36 -0000 1.8 --- Portability.h 24 Jun 2005 17:50:48 -0000 1.9 *************** *** 60,74 **** #define OPAL_EXPORT_FUNCTION extern "C" OPAL_DECL - // In Visual Studio, this is the only way to conditionally link with - // external libraries. - #if defined (OPAL_USE_XML) - #if defined(WIN32) || defined(_WIN32) - #if defined(_DEBUG) - #pragma comment(lib,"tinyxmld.lib") - #else - #pragma comment(lib,"tinyxml.lib") - #endif - #endif - #endif - #endif --- 60,62 ---- |