Added guards to avoid useless (and sometime dangerous) inclusion of internal file of the vcglib

This commit is contained in:
Paolo Cignoni 2012-10-25 21:29:10 +00:00
parent 671af109a9
commit d784bebe07
10 changed files with 29 additions and 60 deletions

View File

@ -20,14 +20,12 @@
* for more details. * * for more details. *
* * * *
****************************************************************************/ ****************************************************************************/
#include <vcg/complex/complex.h> #ifndef __VCG_MESH
#error "This file should not be included alone. It is automatically included by complex.h"
#endif
#ifndef __VCG_EDGE_PLUS #ifndef __VCG_EDGE_PLUS
#define __VCG_EDGE_PLUS #define __VCG_EDGE_PLUS
namespace vcg { namespace vcg {
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* /*
The base class of all the recusive definition chain. It is just a container of the typenames of the various simplexes. The base class of all the recusive definition chain. It is just a container of the typenames of the various simplexes.

View File

@ -20,8 +20,9 @@
* for more details. * * for more details. *
* * * *
****************************************************************************/ ****************************************************************************/
#include <vcg/complex/complex.h> #ifndef __VCG_MESH
#error "This file should not be included alone. It is automatically included by complex.h"
#endif
#ifndef __VCG_EDGE_PLUS_COMPONENT #ifndef __VCG_EDGE_PLUS_COMPONENT
#define __VCG_EDGE_PLUS_COMPONENT #define __VCG_EDGE_PLUS_COMPONENT

View File

@ -20,8 +20,9 @@
* for more details. * * for more details. *
* * * *
****************************************************************************/ ****************************************************************************/
#include <vcg/complex/complex.h> #ifndef __VCG_MESH
#error "This file should not be included alone. It is automatically included by complex.h"
#endif
#ifndef __VCG_FACE_PLUS #ifndef __VCG_FACE_PLUS
#define __VCG_FACE_PLUS #define __VCG_FACE_PLUS

View File

@ -20,7 +20,9 @@
* for more details. * * for more details. *
* * * *
****************************************************************************/ ****************************************************************************/
#include <vcg/complex/complex.h> #ifndef __VCG_MESH
#error "This file should not be included alone. It is automatically included by complex.h"
#endif
#ifndef __VCG_FACE_PLUS_COMPONENT #ifndef __VCG_FACE_PLUS_COMPONENT
#define __VCG_FACE_PLUS_COMPONENT #define __VCG_FACE_PLUS_COMPONENT

View File

@ -22,11 +22,13 @@
****************************************************************************/ ****************************************************************************/
/* /*
Note
OCC = Optional Component Compact OCC = Optional Component Compact
compare with OCF(Optional Component Fast) compare with OCF(Optional Component Fast)
*/
****************************************************************************/ #ifndef __VCG_MESH
#error "This file should not be included alone. It is automatically included by complex.h"
#endif
#ifndef __VCG_FACE_PLUS_COMPONENT_OCC #ifndef __VCG_FACE_PLUS_COMPONENT_OCC
#define __VCG_FACE_PLUS_COMPONENT_OCC #define __VCG_FACE_PLUS_COMPONENT_OCC

View File

@ -19,15 +19,6 @@
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
* for more details. * * for more details. *
* * * *
****************************************************************************/
/*
Note
OCF = Optional Component Fast (hopefully)
compare with OCC(Optional Component Compact)
Mainly the trick here is to store a base pointer in each simplex...
****************************************************************************/ ****************************************************************************/
#ifndef __VCG_FACE_PLUS_COMPONENT_OCF #ifndef __VCG_FACE_PLUS_COMPONENT_OCF
#define __VCG_FACE_PLUS_COMPONENT_OCF #define __VCG_FACE_PLUS_COMPONENT_OCF

View File

@ -20,34 +20,14 @@
* for more details. * * for more details. *
* * * *
****************************************************************************/ ****************************************************************************/
#include <vcg/complex/complex.h> #ifndef __VCG_MESH
#error "This file should not be included alone. It is automatically included by complex.h"
#endif
#ifndef __VCG_VERTEX_PLUS #ifndef __VCG_VERTEX_PLUS
#define __VCG_VERTEX_PLUS #define __VCG_VERTEX_PLUS
namespace vcg { namespace vcg {
/*------------------------------------------------------------------*/
/*
The base class of all the recusive definition chain. It is just a container of the typenames of the various simplexes.
These typenames must be known form all the derived classes.
*/
//
//template <class BVT, class BET, class BFT, class BTT>
//class VertexTypeHolder{
// public:
// typedef BVT VertType;
// typedef BET EdgeType;
// typedef BFT FaceType;
// typedef BTT TetraType;
// typedef BVT *VertPointer;
// typedef BET *EdgePointer;
// typedef BFT *FacePointer;
// typedef BTT *TetraPointer;
// template < class LeftV>
// void ImportData(const LeftV & /* left */ ) { }
// static void Name(std::vector<std::string> & /* name */){}
//
//};
/* The base class form which we start to add our components. /* The base class form which we start to add our components.
it has the empty definition for all the standard members (coords, color flags) it has the empty definition for all the standard members (coords, color flags)
@ -59,13 +39,6 @@ In other words we cannot derive and add in a single derivation step
(with multiple ancestor), both the real (non-empty) normal and color but (with multiple ancestor), both the real (non-empty) normal and color but
we have to build the type a step a time (deriving from a single ancestor at a time). we have to build the type a step a time (deriving from a single ancestor at a time).
*/
//template <class UserUsedTypes>
//class VertexBase: public vertex::EmptyCore< UserUsedTypes >{
//};
/* The Real Big Vertex class; /* The Real Big Vertex class;
The class __VertexArityMax__ is the one that is the Last to be derived, The class __VertexArityMax__ is the one that is the Last to be derived,

View File

@ -20,6 +20,9 @@
* for more details. * * for more details. *
* * * *
****************************************************************************/ ****************************************************************************/
#ifndef __VCG_MESH
#error "This file should not be included alone. It is automatically included by complex.h"
#endif
#ifndef __VCG_VERTEX_PLUS_COMPONENT #ifndef __VCG_VERTEX_PLUS_COMPONENT
#define __VCG_VERTEX_PLUS_COMPONENT #define __VCG_VERTEX_PLUS_COMPONENT
namespace vcg { namespace vcg {

View File

@ -33,13 +33,12 @@ Working release (compilata solo su MSVC), component_occ <20> migrato da component
****************************************************************************/ ****************************************************************************/
#ifndef __VCG_MESH
#error "This file should not be included alone. It is automatically included by complex.h"
#endif
#ifndef __VCG_VERTEX_PLUS_COMPONENT_OCC #ifndef __VCG_VERTEX_PLUS_COMPONENT_OCC
#define __VCG_VERTEX_PLUS_COMPONENT_OCC #define __VCG_VERTEX_PLUS_COMPONENT_OCC
#include <vcg/simplex/vertex/component.h>
#include <vcg/container/vector_occ.h>
namespace vcg { namespace vcg {
namespace vertex { namespace vertex {
/* /*

View File

@ -22,13 +22,12 @@
****************************************************************************/ ****************************************************************************/
/* /*
Note
OCF = Optional Component Fast (hopefully) OCF = Optional Component Fast (hopefully)
compare with OCC(Optional Component Compact) compare with OCC(Optional Component Compact)
*/
Mainly the trick here is to store a base pointer in each simplex... #ifndef __VCG_MESH
#error "This file should not be included alone. It is automatically included by complex.h"
****************************************************************************/ #endif
#ifndef __VCG_VERTEX_PLUS_COMPONENT_OCF #ifndef __VCG_VERTEX_PLUS_COMPONENT_OCF
#define __VCG_VERTEX_PLUS_COMPONENT_OCF #define __VCG_VERTEX_PLUS_COMPONENT_OCF
#ifndef __VCG_MESH #ifndef __VCG_MESH