00001 /**************************************************************************** 00002 ** 00003 ** Copyright (c) 2008-2011 C.B. Barber. All rights reserved. 00004 ** $Id: //main/2011/qhull/src/libqhullcpp/RboxPoints.h#5 $$Change: 1382 $ 00005 ** $DateTime: 2011/05/14 10:45:42 $$Author: bbarber $ 00006 ** 00007 ****************************************************************************/ 00008 00009 #ifndef RBOXPOINTS_H 00010 #define RBOXPOINTS_H 00011 00012 #include "QhullPoint.h" 00013 #include "PointCoordinates.h" 00014 extern "C" { 00015 #include "libqhull/libqhull.h" 00016 } 00017 00018 #include <stdarg.h> 00019 #include <string> 00020 #include <vector> 00021 #include <istream> 00022 #include <ostream> 00023 #include <sstream> 00024 00025 namespace orgQhull { 00026 00027 #//Types 00028 00029 class RboxPoints; 00030 00031 class RboxPoints : public PointCoordinates { 00032 00033 private: 00034 #//Fields and friends 00035 int rbox_new_count; 00036 int rbox_status; 00037 std::string rbox_message; 00038 00039 friend void ::qh_fprintf_rbox(FILE *fp, int msgcode, const char *fmt, ... ); 00040 00041 public: 00042 #//Construct 00043 RboxPoints(); 00044 explicit RboxPoints(const char *rboxCommand); 00045 RboxPoints(const RboxPoints &other); 00046 RboxPoints &operator=(const RboxPoints &other); 00047 ~RboxPoints(); 00048 00049 public: 00050 #//GetSet 00051 void clearRboxMessage(); 00052 int newCount() const { return rbox_new_count; } 00053 std::string rboxMessage() const; 00054 int rboxStatus() const; 00055 bool hasRboxMessage() const; 00056 void setNewCount(int pointCount) { QHULL_ASSERT(pointCount>=0); rbox_new_count= pointCount; } 00057 00058 #//Modify 00059 void appendPoints(const char* rboxCommand); 00060 using PointCoordinates::appendPoints; 00061 void reservePoints() { reserveCoordinates((count()+newCount())*dimension()); } 00062 };//class RboxPoints 00063 00064 }//namespace orgQhull 00065 00066 #endif // RBOXPOINTS_H