/usr/include/libqhullcpp/QhullFacetSet.h is in libqhull-dev 2012.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | /****************************************************************************
**
** Copyright (c) 2008-2012 C.B. Barber. All rights reserved.
** $Id: //main/2011/qhull/src/libqhullcpp/QhullFacetSet.h#5 $$Change: 1464 $
** $DateTime: 2012/01/25 22:58:41 $$Author: bbarber $
**
****************************************************************************/
#ifndef QHULLFACETSET_H
#define QHULLFACETSET_H
#include "QhullSet.h"
#include <ostream>
namespace orgQhull {
#//ClassRef
class QhullFacet;
#//Types
//! QhullFacetSet -- a set of Qhull facets, as a C++ class. See QhullFacetList.h
class QhullFacetSet;
typedef QhullSetIterator<QhullFacet>
QhullFacetSetIterator;
class QhullFacetSet : public QhullSet<QhullFacet> {
private:
#//Fields
bool select_all; //! True if include bad facets. Default is false.
public:
#//Constructor
//Conversion from setT* is not type-safe. Implicit conversion for void* to T
explicit QhullFacetSet(setT *s) : QhullSet<QhullFacet>(s), select_all(false) {}
//Copy constructor copies pointer but not contents. Needed for return by value and parameter passing.
QhullFacetSet(const QhullFacetSet &o) : QhullSet<QhullFacet>(o), select_all(o.select_all) {}
private:
//!Disable default constructor and copy assignment. See QhullSetBase
QhullFacetSet();
QhullFacetSet &operator=(const QhullFacetSet &);
public:
#//Conversion
#ifndef QHULL_NO_STL
std::vector<QhullFacet> toStdVector() const;
#endif //QHULL_NO_STL
#ifdef QHULL_USES_QT
QList<QhullFacet> toQList() const;
#endif //QHULL_USES_QT
#//GetSet
bool isSelectAll() const { return select_all; }
void selectAll() { select_all= true; }
void selectGood() { select_all= false; }
#//Read-only
//! Filtered by facet.isGood(). May be 0 when !isEmpty().
int count() const;
bool contains(const QhullFacet &f) const;
int count(const QhullFacet &f) const;
//! operator==() does not depend on isGood()
#//IO
// Not same as QhullFacetList#IO. A QhullFacetSet is a component of a QhullFacetList.
struct PrintFacetSet{
const QhullFacetSet *facet_set;
const char *print_message;
int run_id;
PrintFacetSet(int qhRunId, const char *message, const QhullFacetSet *s) : facet_set(s), print_message(message), run_id(qhRunId) {}
};//PrintFacetSet
const PrintFacetSet print(int qhRunId, const char *message) const { return PrintFacetSet(qhRunId, message, this); }
struct PrintIdentifiers{
const QhullFacetSet *facet_set;
const char *print_message;
PrintIdentifiers(const char *message, const QhullFacetSet *s) : facet_set(s), print_message(message) {}
};//PrintIdentifiers
PrintIdentifiers printIdentifiers(const char *message) const { return PrintIdentifiers(message, this); }
};//class QhullFacetSet
}//namespace orgQhull
#//== Global namespace =========================================
std::ostream &operator<<(std::ostream &os, const orgQhull::QhullFacetSet &fs);
std::ostream &operator<<(std::ostream &os, const orgQhull::QhullFacetSet::PrintFacetSet &pr);
std::ostream &operator<<(std::ostream &os, const orgQhull::QhullFacetSet::PrintIdentifiers &p);
#endif // QHULLFACETSET_H
|