Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Pitiot
CGoGN
Commits
40687654
Commit
40687654
authored
Apr 23, 2014
by
Sylvain Thery
Browse files
cell parameter in [] of AttributeHandler
parent
c9c55962
Changes
5
Hide whitespace changes
Inline
Side-by-side
include/Topology/generic/attributeHandler.h
View file @
40687654
...
...
@@ -31,6 +31,7 @@
#include
"Topology/generic/genericmap.h"
#include
"Container/attributeContainer.h"
#include
"Container/fakeAttribute.h"
#include
"Topology/generic/cells.h"
namespace
CGoGN
{
...
...
@@ -189,14 +190,14 @@ public:
unsigned
int
nbElements
()
const
;
/**
* [] operator with
dart
parameter
* [] operator with
cell
parameter
*/
T
&
operator
[](
Dart
d
)
;
T
&
operator
[](
Cell
<
ORBIT
>
c
)
;
/**
* const [] operator with
dart
parameter
* const [] operator with
cell
parameter
*/
const
T
&
operator
[](
Dart
d
)
const
;
const
T
&
operator
[](
Cell
<
ORBIT
>
c
)
const
;
/**
* at operator (same as [] but with index parameter)
...
...
include/Topology/generic/attributeHandler.hpp
View file @
40687654
...
...
@@ -185,7 +185,7 @@ inline unsigned int AttributeHandler<T, ORBIT, MAP_IMPL>::nbElements() const
}
template
<
typename
T
,
unsigned
int
ORBIT
,
typename
MAP_IMPL
>
inline
T
&
AttributeHandler
<
T
,
ORBIT
,
MAP_IMPL
>::
operator
[](
Dart
d
)
inline
T
&
AttributeHandler
<
T
,
ORBIT
,
MAP_IMPL
>::
operator
[](
Cell
<
ORBIT
>
d
)
{
assert
(
valid
||
!
"Invalid AttributeHandler"
)
;
unsigned
int
a
=
m_map
->
template
getEmbedding
<
ORBIT
>(
d
)
;
...
...
@@ -197,7 +197,7 @@ inline T& AttributeHandler<T, ORBIT, MAP_IMPL>::operator[](Dart d)
}
template
<
typename
T
,
unsigned
int
ORBIT
,
typename
MAP_IMPL
>
inline
const
T
&
AttributeHandler
<
T
,
ORBIT
,
MAP_IMPL
>::
operator
[](
Dart
d
)
const
inline
const
T
&
AttributeHandler
<
T
,
ORBIT
,
MAP_IMPL
>::
operator
[](
Cell
<
ORBIT
>
d
)
const
{
assert
(
valid
||
!
"Invalid AttributeHandler"
)
;
unsigned
int
a
=
m_map
->
template
getEmbedding
<
ORBIT
>(
d
)
;
...
...
include/Topology/generic/multi3Attribs.h
View file @
40687654
...
...
@@ -25,6 +25,8 @@
#ifndef __MULTI3ATTRIBS_H_
#define __MULTI3ATTRIBS_H_
#include
"Topology/generic/cells.h"
namespace
CGoGN
{
...
...
@@ -102,7 +104,7 @@ public:
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
]);
}
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Dart
d
)
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Vertex
d
)
{
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
]);
}
...
...
@@ -112,7 +114,7 @@ public:
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
]);
}
const
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Dart
d
)
const
const
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Vertex
d
)
const
{
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
]);
}
...
...
@@ -139,7 +141,7 @@ public:
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
]);
}
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Dart
d
)
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Edge
d
)
{
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
]);
}
...
...
@@ -149,7 +151,7 @@ public:
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
]);
}
const
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Dart
d
)
const
const
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Edge
d
)
const
{
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
]);
}
...
...
@@ -177,7 +179,7 @@ public:
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
]);
}
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Dart
d
)
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Face
d
)
{
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
]);
}
...
...
@@ -187,7 +189,7 @@ public:
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
]);
}
const
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Dart
d
)
const
const
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Face
d
)
const
{
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
]);
}
...
...
@@ -213,7 +215,7 @@ public:
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
]);
}
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Dart
d
)
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Vol
d
)
{
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
]);
}
...
...
@@ -223,7 +225,7 @@ public:
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
]);
}
const
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Dart
d
)
const
const
RefCompo3Type
<
T1
,
T2
,
T3
>
operator
[](
Vol
d
)
const
{
return
RefCompo3Type
<
T1
,
T2
,
T3
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
]);
}
...
...
include/Topology/generic/multi4Attribs.h
View file @
40687654
...
...
@@ -25,6 +25,8 @@
#ifndef __MULTI4ATTRIBS_H_
#define __MULTI4ATTRIBS_H_
#include
"Topology/generic/cells.h"
namespace
CGoGN
{
...
...
@@ -105,7 +107,7 @@ public:
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
],
m_h4
[
a
]);
}
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Dart
d
)
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Vertex
d
)
{
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
],
m_h4
[
d
]);
}
...
...
@@ -115,7 +117,7 @@ public:
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
],
m_h4
[
a
]);
}
const
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Dart
d
)
const
const
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Vertex
d
)
const
{
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
],
m_h4
[
d
]);
}
...
...
@@ -143,7 +145,7 @@ public:
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
],
m_h4
[
a
]);
}
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Dart
d
)
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Edge
d
)
{
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
],
m_h4
[
d
]);
}
...
...
@@ -153,7 +155,7 @@ public:
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
],
m_h4
[
a
]);
}
const
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Dart
d
)
const
const
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Edge
d
)
const
{
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
],
m_h4
[
d
]);
}
...
...
@@ -182,7 +184,7 @@ public:
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
],
m_h4
[
a
]);
}
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Dart
d
)
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Face
d
)
{
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
],
m_h4
[
d
]);
}
...
...
@@ -192,7 +194,7 @@ public:
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
],
m_h4
[
a
]);
}
const
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Dart
d
)
const
const
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Face
d
)
const
{
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
],
m_h4
[
d
]);
}
...
...
@@ -219,7 +221,7 @@ public:
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
],
m_h4
[
a
]);
}
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Dart
d
)
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Vol
d
)
{
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
],
m_h4
[
d
]);
}
...
...
@@ -229,7 +231,7 @@ public:
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
a
],
m_h2
[
a
],
m_h3
[
a
],
m_h4
[
a
]);
}
const
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Dart
d
)
const
const
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
operator
[](
Vol
d
)
const
{
return
RefCompo4Type
<
T1
,
T2
,
T3
,
T4
>
(
m_h1
[
d
],
m_h2
[
d
],
m_h3
[
d
],
m_h4
[
d
]);
}
...
...
include/Topology/generic/multiAttribs.h
View file @
40687654
...
...
@@ -25,6 +25,8 @@
#ifndef __MULTI2ATTRIBS_H_
#define __MULTI2ATTRIBS_H_
#include
"Topology/generic/cells.h"
namespace
CGoGN
{
...
...
@@ -114,7 +116,7 @@ public:
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
a
],
m_h2
[
a
]);
}
RefCompo2Type
<
T1
,
T2
>
operator
[](
Dart
d
)
RefCompo2Type
<
T1
,
T2
>
operator
[](
Vertex
d
)
{
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
d
],
m_h2
[
d
]);
}
...
...
@@ -124,7 +126,7 @@ public:
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
a
],
m_h2
[
a
]);
}
const
RefCompo2Type
<
T1
,
T2
>
operator
[](
Dart
d
)
const
const
RefCompo2Type
<
T1
,
T2
>
operator
[](
Vertex
d
)
const
{
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
d
],
m_h2
[
d
]);
}
...
...
@@ -149,7 +151,7 @@ public:
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
a
],
m_h2
[
a
]);
}
RefCompo2Type
<
T1
,
T2
>
operator
[](
Dart
d
)
RefCompo2Type
<
T1
,
T2
>
operator
[](
Edge
d
)
{
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
d
],
m_h2
[
d
]);
}
...
...
@@ -159,7 +161,7 @@ public:
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
a
],
m_h2
[
a
]);
}
const
RefCompo2Type
<
T1
,
T2
>
operator
[](
Dart
d
)
const
const
RefCompo2Type
<
T1
,
T2
>
operator
[](
Edge
d
)
const
{
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
d
],
m_h2
[
d
]);
}
...
...
@@ -184,7 +186,7 @@ public:
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
a
],
m_h2
[
a
]);
}
RefCompo2Type
<
T1
,
T2
>
operator
[](
Dart
d
)
RefCompo2Type
<
T1
,
T2
>
operator
[](
Face
d
)
{
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
d
],
m_h2
[
d
]);
}
...
...
@@ -194,7 +196,7 @@ public:
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
a
],
m_h2
[
a
]);
}
const
RefCompo2Type
<
T1
,
T2
>
operator
[](
Dart
d
)
const
const
RefCompo2Type
<
T1
,
T2
>
operator
[](
Face
d
)
const
{
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
d
],
m_h2
[
d
]);
}
...
...
@@ -219,7 +221,7 @@ public:
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
a
],
m_h2
[
a
]);
}
RefCompo2Type
<
T1
,
T2
>
operator
[](
Dart
d
)
RefCompo2Type
<
T1
,
T2
>
operator
[](
Vol
d
)
{
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
d
],
m_h2
[
d
]);
}
...
...
@@ -229,7 +231,7 @@ public:
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
a
],
m_h2
[
a
]);
}
const
RefCompo2Type
<
T1
,
T2
>
operator
[](
Dart
d
)
const
const
RefCompo2Type
<
T1
,
T2
>
operator
[](
Vol
d
)
const
{
return
RefCompo2Type
<
T1
,
T2
>
(
m_h1
[
d
],
m_h2
[
d
]);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment