00001 00002 // 00003 // Title : BoxData.h 00004 // Project : OSCAR 00005 // Created : June 2, 2005. 4:00 PM 00006 // Author : Chetan Kapoor 00007 // Platforms : All 00008 // Copyright : Copyright© The University of Texas at Austin, 2002. All rights reserved. 00009 // 00010 // This software and documentation constitute an unpublished work 00011 // and contain valuable trade secrets and proprietary information 00012 // belonging to the University. None of the foregoing material may be 00013 // copied or duplicated or disclosed without the express, written 00014 // permission of University. THE UNIVERSITY EXPRESSLY DISCLAIMS ANY 00015 // AND ALL WARRANTIES CONCERNING THIS SOFTWARE AND DOCUMENTATION, 00016 // INCLUDING ANY WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 00017 // PARTICULAR PURPOSE, AND WARRANTIES OF PERFORMANCE, AND ANY WARRANTY 00018 // THAT MIGHT OTHERWISE ARISE FROM COURSE OF DEALING OR USAGE OF TRADE. 00019 // NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH RESPECT TO THE USE OF 00020 // THE SOFTWARE OR DOCUMENTATION. Under no circumstances shall the 00021 // University be liable for incidental, special, indirect, direct or 00022 // consequential damages or loss of profits, interruption of business, 00023 // or related expenses which may arise from use of software or documentation, 00024 // including but not limited to those resulting from defects in software 00025 // and/or documentation, or loss or inaccuracy of data of any kind. 00026 // 00027 // Purpose : Class for loading related data for a Box 00028 // specified in XML format 00029 // 00030 //---------------------------------------------------------------------------- 00031 // $Log: BoxData.h,v $ 00032 // Revision 1.4 2005/06/29 04:30:31 chetan 00033 // Quite a few changes to improve Output of XML and addition of custom root element names, addition of manipulator obstacle model, etc. 00034 // 00035 // Revision 1.3 2005/06/22 02:24:47 chetan 00036 // Added a protected constructor for derived classes and a static method for serializing corresponding objects to XML 00037 // 00038 // Revision 1.2 2005/06/06 19:24:03 aspencer 00039 // Changed the idempotency guarantee from ConeData_h to BoxData_h 00040 // 00041 // Revision 1.1 2005/06/06 14:22:56 chetan 00042 // Initial Committ 00043 // 00044 // 00046 #ifndef BoxData_h 00047 #define BoxData_h 00048 00049 #include "FileData/XMLData.h" 00050 #include "ObstacleAvoidance/Box.hpp" 00051 00052 00053 XERCES_CPP_NAMESPACE_USE 00054 00055 00056 namespace OSCAR { 00057 00065 class BoxData : public XMLData 00066 { 00067 public: 00068 00082 BoxData(const String& inputFileName, OSCARError &err = DUMMY_ERROR(noError), const String& rootElementName = String("Box"), const String name = String(" ")); 00083 00102 BoxData(const char* xmlDataString, OSCARError &err = DUMMY_ERROR(noError), const String& rootElementName = String("Box"), const String name = String(" ")); 00103 00118 BoxData(const DOMElement* coneNode, OSCARError &err = DUMMY_ERROR(noError), const String& rootElementName = String("Box"), const String name = String(" ")); 00119 00120 00131 BoxData(const Box& box, OSCARError &err = DUMMY_ERROR(noError), const String& rootElementName = String("Box"), const String name = String(" ")); 00132 00133 00141 BoxData(const BoxData& rhs); 00142 00148 virtual ~BoxData(); 00149 00157 BoxData& operator=(const BoxData& rhs); 00158 00164 const Box* GetParameters() const; 00165 00171 bool SetParameters(const Box& box); 00172 00184 bool Output(std::ostream& out, bool nameSpaceHeader = false) const; 00185 00198 static bool Output(const Box* box, std::ostream& strm, const String& rootElementName=String("Box"), bool nameSpaceHeader=false); 00199 00200 protected: 00201 Box *box; 00202 00208 virtual bool parseParameters(const DOMElement* coneNode); 00209 }; 00210 00211 } 00212 #endif // ConeData_h
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |