QhullPointSet.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (c) 2009-2015 C.B. Barber. All rights reserved.
4 ** $Id: //main/2015/qhull/src/libqhullcpp/QhullPointSet.h#3 $$Change: 2066 $
5 ** $DateTime: 2016/01/18 19:29:17 $$Author: bbarber $
6 **
7 ****************************************************************************/
8 
9 #ifndef QHULLPOINTSET_H
10 #define QHULLPOINTSET_H
11 
12 extern "C" {
13  #include "libqhull_r/qhull_ra.h"
14 }
15 #include "libqhullcpp/QhullSet.h"
16 #include "libqhullcpp/QhullPoint.h"
17 
18 #include <ostream>
19 
20 namespace orgQhull {
21 
22 #
23  class Qhull;
24  class QhullPoint;
25 
26 #
27  // with const_iterator and iterator
29  class QhullPointSet;
30 
31 class QhullPointSet : public QhullSet<QhullPoint> {
32 
33 private:
34 #
35  // no fields
36 public:
37 
38 #
39  QhullPointSet(const Qhull &q, setT *s) : QhullSet<QhullPoint>(q, s) {}
40  //Conversion from setT* is not type-safe. Implicit conversion for void* to T
41  QhullPointSet(QhullQh *qqh, setT *s) : QhullSet<QhullPoint>(qqh, s) {}
42  //Copy constructor copies pointer but not contents. Needed for return by value and parameter passing.
43  QhullPointSet(const QhullPointSet &other) : QhullSet<QhullPoint>(other) {}
45  QhullPointSet & operator=(const QhullPointSet &other) { QhullSet<QhullPoint>::operator=(other); return *this; }
47 
49 private:
50  QhullPointSet();
51 public:
52 
53 #
54  struct PrintIdentifiers{
56  const char * print_message;
57  PrintIdentifiers(const char *message, const QhullPointSet *s) : point_set(s), print_message(message) {}
58  };//PrintIdentifiers
59  PrintIdentifiers printIdentifiers(const char *message) const { return PrintIdentifiers(message, this); }
60 
61  struct PrintPointSet{
63  const char * print_message;
64  PrintPointSet(const char *message, const QhullPointSet &s) : point_set(&s), print_message(message) {}
65  };//PrintPointSet
66  PrintPointSet print(const char *message) const { return PrintPointSet(message, *this); }
67 
68 };//QhullPointSet
69 
71 
72 }//namespace orgQhull
73 
74 #
75 
76 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullPointSet::PrintIdentifiers &pr);
77 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullPointSet::PrintPointSet &pr);
78 
79 #endif // QHULLPOINTSET_H
QhullSetIterator< QhullPoint > QhullPointSetIterator
Definition: QhullPointSet.h:70
PrintPointSet(const char *message, const QhullPointSet &s)
Definition: QhullPointSet.h:64
PrintIdentifiers(const char *message, const QhullPointSet *s)
Definition: QhullPointSet.h:57
QhullPointSet & operator=(const QhullPointSet &other)
Assignment copies pointers but not contents.
Definition: QhullPointSet.h:45
Definition: qset.h:83
QhullRidge – Qhull&#39;s ridge structure, ridgeT, as a C++ class.
Definition: Coordinates.cpp:21
std::ostream & operator<<(std::ostream &os, const orgQhull::QhullPointSet::PrintIdentifiers &pr)
QhullSet< T > & operator=(const QhullSet< T > &other)
Definition: QhullSet.h:120
POD type equivalent to qhT. No virtual members.
Definition: QhullQh.h:58
Faster then interator/const_iterator due to T::base_type.
Definition: QhullSet.h:283
QhullPointSet()
Default constructor disabled.
const char * print_message
non-null message
Definition: QhullPointSet.h:63
PrintPointSet print(const char *message) const
Definition: QhullPointSet.h:66
QhullPointSet(QhullQh *qqh, setT *s)
Definition: QhullPointSet.h:41
QhullPointSet(const QhullPointSet &other)
Definition: QhullPointSet.h:43
PrintIdentifiers printIdentifiers(const char *message) const
Definition: QhullPointSet.h:59
const char * print_message
non-null message
Definition: QhullPointSet.h:56


hpp-fcl
Author(s):
autogenerated on Fri Jun 2 2023 02:39:02