QhullVertexSet.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 **
00003 ** Copyright (c) 2009-2011 C.B. Barber. All rights reserved.
00004 ** $Id: //main/2011/qhull/src/libqhullcpp/QhullVertexSet.h#4 $$Change: 1382 $
00005 ** $DateTime: 2011/05/14 10:45:42 $$Author: bbarber $
00006 **
00007 ****************************************************************************/
00008 
00009 #ifndef QHULLVERTEXSET_H
00010 #define QHULLVERTEXSET_H
00011 
00012 #include "QhullSet.h"
00013 
00014 #include <ostream>
00015 
00016 namespace orgQhull {
00017 
00018 #//ClassRef
00019     class               QhullVertex;
00020 
00021 #//Types
00022 
00023 
00024     class               QhullVertexSet;
00025     typedef QhullSetIterator<QhullVertex>
00026                         QhullVertexSetIterator;
00027 
00028 class QhullVertexSet : public QhullSet<QhullVertex> {
00029 
00030 private:
00031 #//Fields
00032     Qhull              *qhsettemp_qhull; 
00033     bool                qhsettemp_defined;  
00034 
00035 public:
00036 #//Constructor
00037                         //Conversion from setT* is not type-safe.  Implicit conversion for void* to T
00038    explicit             QhullVertexSet(setT *s) : QhullSet<QhullVertex>(s), qhsettemp_qhull(0), qhsettemp_defined(false) {}
00039                         QhullVertexSet(int qhRunId, facetT *facetlist, setT *facetset, bool allfacets);
00040                         //Copy constructor copies pointer but not contents.  Needed for return by value.
00041                         QhullVertexSet(const QhullVertexSet &o) : QhullSet<QhullVertex>(o), qhsettemp_qhull(o.qhsettemp_qhull), qhsettemp_defined(o.qhsettemp_defined) {}
00042                        ~QhullVertexSet();
00043 
00044 private:
00046                         QhullVertexSet();
00047     QhullVertexSet      &operator=(const QhullVertexSet &);
00048 public:
00049 
00050 #//Constructor, destructor
00051     void                freeQhSetTemp();
00052 
00053 #//IO
00054     struct PrintVertexSet{
00055         const QhullVertexSet *Vertex_set;
00056         const char     *print_message;
00057         int             run_id;
00058                         PrintVertexSet(int qhRunId, const char *message, const QhullVertexSet *s) : Vertex_set(s), print_message(message), run_id(qhRunId) {}
00059     };//PrintVertexSet
00060     const PrintVertexSet       print(int qhRunId, const char *message) const { return PrintVertexSet(qhRunId, message, this); }
00061 
00062     struct PrintIdentifiers{
00063         const QhullVertexSet *Vertex_set;
00064         const char     *print_message;
00065                         PrintIdentifiers(const char *message, const QhullVertexSet *s) : Vertex_set(s), print_message(message) {}
00066     };//PrintIdentifiers
00067     PrintIdentifiers    printIdentifiers(const char *message) const { return PrintIdentifiers(message, this); }
00068 
00069 };//class QhullVertexSet
00070 
00071 }//namespace orgQhull
00072 
00073 #//== Global namespace =========================================
00074 
00075 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullVertexSet::PrintVertexSet &pr);
00076 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullVertexSet::PrintIdentifiers &p);
00077 inline std::ostream &operator<<(std::ostream &os, const orgQhull::QhullVertexSet &vs) { os << vs.print(orgQhull::UsingLibQhull::NOqhRunId, ""); return os; }
00078 
00079 #endif // QHULLVERTEXSET_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


libqhull
Author(s): Robert Krug
autogenerated on Tue Jun 18 2013 12:38:50