Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Pitiot
CGoGN
Commits
8fb58c43
Commit
8fb58c43
authored
Sep 05, 2011
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of cgogn:~cgogn/CGoGN
parents
a8449583
7b93a4a0
Changes
30
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
405 additions
and
205 deletions
+405
-205
Apps/Examples/viewer.cpp
Apps/Examples/viewer.cpp
+2
-1
include/Algo/Import/import2tables.h
include/Algo/Import/import2tables.h
+5
-5
include/Algo/Import/import2tablesSurface.hpp
include/Algo/Import/import2tablesSurface.hpp
+1
-1
include/Container/attributeContainer.hpp
include/Container/attributeContainer.hpp
+3
-0
include/Topology/generic/attribmap.h
include/Topology/generic/attribmap.h
+13
-9
include/Topology/generic/attribmap.hpp
include/Topology/generic/attribmap.hpp
+10
-1
include/Topology/generic/attributeHandler.h
include/Topology/generic/attributeHandler.h
+44
-21
include/Topology/generic/attributeHandler.hpp
include/Topology/generic/attributeHandler.hpp
+71
-42
include/Topology/generic/autoAttributeHandler.h
include/Topology/generic/autoAttributeHandler.h
+3
-1
include/Topology/generic/cellmarker.h
include/Topology/generic/cellmarker.h
+3
-3
include/Topology/generic/dartmarker.h
include/Topology/generic/dartmarker.h
+6
-6
include/Topology/generic/genericmap.h
include/Topology/generic/genericmap.h
+72
-82
include/Topology/generic/genericmap.hpp
include/Topology/generic/genericmap.hpp
+0
-16
include/Topology/gmap/gmap0.h
include/Topology/gmap/gmap0.h
+4
-0
include/Topology/gmap/gmap0.hpp
include/Topology/gmap/gmap0.hpp
+12
-1
include/Topology/gmap/gmap1.h
include/Topology/gmap/gmap1.h
+4
-0
include/Topology/gmap/gmap1.hpp
include/Topology/gmap/gmap1.hpp
+12
-1
include/Topology/gmap/gmap2.h
include/Topology/gmap/gmap2.h
+4
-0
include/Topology/gmap/gmap2.hpp
include/Topology/gmap/gmap2.hpp
+12
-1
include/Topology/gmap/gmap3.h
include/Topology/gmap/gmap3.h
+4
-0
include/Topology/gmap/gmap3.hpp
include/Topology/gmap/gmap3.hpp
+10
-1
include/Topology/map/map1.h
include/Topology/map/map1.h
+5
-1
include/Topology/map/map1.hpp
include/Topology/map/map1.hpp
+14
-3
include/Topology/map/map2.h
include/Topology/map/map2.h
+4
-0
include/Topology/map/map2.hpp
include/Topology/map/map2.hpp
+12
-1
include/Topology/map/map3.h
include/Topology/map/map3.h
+4
-0
include/Topology/map/map3.hpp
include/Topology/map/map3.hpp
+12
-1
src/Topology/generic/attribmap.cpp
src/Topology/generic/attribmap.cpp
+21
-3
src/Topology/generic/genericmap.cpp
src/Topology/generic/genericmap.cpp
+36
-3
src/Utils/Shaders/shaderSimpleColor.cpp
src/Utils/Shaders/shaderSimpleColor.cpp
+2
-1
No files found.
Apps/Examples/viewer.cpp
View file @
8fb58c43
...
...
@@ -175,6 +175,8 @@ void Viewer::cb_Open()
void
Viewer
::
importMesh
(
std
::
string
&
filename
)
{
myMap
.
clear
(
true
)
;
std
::
vector
<
std
::
string
>
attrNames
;
if
(
!
Algo
::
Import
::
importMesh
<
PFP
>
(
myMap
,
filename
.
c_str
(),
attrNames
))
{
...
...
@@ -191,7 +193,6 @@ void Viewer::importMesh(std::string& filename)
normalBaseSize
=
bb
.
diagSize
()
/
100.0
f
;
// vertexBaseSize = normalBaseSize /5.0f ;
if
(
!
normal
.
isValid
())
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
)
;
...
...
include/Algo/Import/import2tables.h
View file @
8fb58c43
...
...
@@ -65,9 +65,9 @@ class MeshTablesSurface
protected:
typename
PFP
::
MAP
&
m_map
;
unsigned
m_nbVertices
;
unsigned
int
m_nbVertices
;
unsigned
m_nbFaces
;
unsigned
int
m_nbFaces
;
unsigned
int
m_lab
;
...
...
@@ -138,11 +138,11 @@ class MeshTablesVolume
protected:
typename
PFP
::
MAP
&
m_map
;
unsigned
m_nbVertices
;
unsigned
int
m_nbVertices
;
unsigned
m_nbFaces
;
unsigned
int
m_nbFaces
;
unsigned
m_nbVolumes
;
unsigned
int
m_nbVolumes
;
/**
* number of edges per face
...
...
include/Algo/Import/import2tablesSurface.hpp
View file @
8fb58c43
include/Container/attributeContainer.hpp
View file @
8fb58c43
...
...
@@ -63,8 +63,11 @@ AttributeMultiVector<T>* AttributeContainer::addAttribute(const std::string& att
{
index
=
getAttributeIndex
(
attribName
)
;
if
(
index
!=
UNKNOWN
)
{
std
::
cout
<<
"attribute "
<<
attribName
<<
" already found.."
<<
std
::
endl
;
return
NULL
;
}
}
// create the new attribute
std
::
string
typeName
=
nameOfType
(
T
())
;
...
...
include/Topology/generic/attribmap.h
View file @
8fb58c43
...
...
@@ -33,14 +33,18 @@ namespace CGoGN
class
AttribMap
:
public
GenericMap
{
private:
friend
class
CellMarkerGen
;
template
<
typename
T
>
friend
class
AutoAttributeHandler
;
void
init
()
;
public:
static
const
unsigned
int
UNKNOWN_ATTRIB
=
AttributeContainer
::
UNKNOWN
;
AttribMap
();
AttribMap
()
;
virtual
void
clear
(
bool
removeAttrib
)
;
/****************************************
* ATTRIBUTES MANAGEMENT *
...
...
@@ -50,10 +54,10 @@ public:
* Create an attribute for a given orbit
* @param orbit
* @param nameAttr attribute name
* @return
a "code orbit" : 8 bits for orbit & 24 bits for index of attribute in contain
er
* @return
an AttributeHandl
er
*/
template
<
typename
T
>
AttributeHandler
<
T
>
addAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
);
AttributeHandler
<
T
>
addAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
;
/**
* remove an attribute
...
...
@@ -61,16 +65,16 @@ public:
* @return true if remove succeed else false
*/
template
<
typename
T
>
bool
removeAttribute
(
AttributeHandler
<
T
>&
attr
);
bool
removeAttribute
(
AttributeHandler
<
T
>&
attr
)
;
/**
* search an attribute for a given orbit
* @param orbit
* @param nameAttr attribute name
* @return
id of attribute : 8 bits for orbit & 24 bits for index of attribute in contain
er
* @return
an AttributeHandl
er
*/
template
<
typename
T
>
AttributeHandler
<
T
>
getAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
);
AttributeHandler
<
T
>
getAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
;
/**
* swap the content of two attributes (efficient, only swap pointers)
...
...
@@ -98,7 +102,7 @@ protected:
* Create the dart attribute to store the embedding of this orbit (for internal use only)
* Also adds a Marker attribute to the container
*/
void
addEmbedding
(
unsigned
int
orbit
);
void
addEmbedding
(
unsigned
int
orbit
)
;
/****************************************
* TOPOLOGICAL ATTRIBUTES MANAGEMENT *
...
...
@@ -108,7 +112,7 @@ protected:
* Add a toological relation in the map
* @param name name of relation
*/
AttributeMultiVector
<
Dart
>*
addRelation
(
const
std
::
string
&
name
);
AttributeMultiVector
<
Dart
>*
addRelation
(
const
std
::
string
&
name
)
;
public:
/****************************************
...
...
include/Topology/generic/attribmap.hpp
View file @
8fb58c43
...
...
@@ -38,7 +38,16 @@ template <typename T>
inline
bool
AttribMap
::
removeAttribute
(
AttributeHandler
<
T
>&
attr
)
{
assert
(
attr
.
isValid
()
||
!
"Invalid attribute handler"
)
;
return
m_attribs
[
attr
.
getOrbit
()].
removeAttribute
<
T
>
(
attr
.
getIndex
())
;
if
(
m_attribs
[
attr
.
getOrbit
()].
removeAttribute
<
T
>
(
attr
.
getIndex
()))
{
typedef
std
::
multimap
<
AttributeMultiVectorGen
*
,
AttributeHandlerGen
*>::
iterator
IT
;
std
::
pair
<
IT
,
IT
>
bounds
=
attributeHandlers
.
equal_range
(
attr
.
getDataVector
())
;
for
(
IT
i
=
bounds
.
first
;
i
!=
bounds
.
second
;
++
i
)
(
*
i
).
second
->
setInvalid
()
;
attributeHandlers
.
erase
(
bounds
.
first
,
bounds
.
second
)
;
return
true
;
}
return
false
;
}
template
<
typename
T
>
...
...
include/Topology/generic/attributeHandler.h
View file @
8fb58c43
...
...
@@ -33,6 +33,38 @@
namespace
CGoGN
{
class
AttributeHandlerGen
{
protected:
friend
class
GenericMap
;
friend
class
AttribMap
;
// the map that contains the linked attribute
GenericMap
*
m_map
;
// boolean that states the validity of the handler
bool
valid
;
public:
AttributeHandlerGen
(
GenericMap
*
m
,
bool
v
)
:
m_map
(
m
),
valid
(
v
)
{}
GenericMap
*
map
()
const
{
return
m_map
;
}
bool
isValid
()
const
{
return
valid
;
}
protected:
void
setInvalid
()
{
valid
=
false
;
}
}
;
/**
* Class that create an access-table to an existing attribute
* Main available operations are:
...
...
@@ -41,18 +73,24 @@ namespace CGoGN
* - begin / end / next to manage indexing
*/
template
<
typename
T
>
class
AttributeHandler
class
AttributeHandler
:
public
AttributeHandlerGen
{
protected:
// we need the map to use dart as index
GenericMap
*
m_map
;
// access to the data
// the multi-vector that contains attribute data
AttributeMultiVector
<
T
>*
m_attrib
;
void
registerInMap
()
;
void
unregisterFromMap
()
;
public:
typedef
T
DATA_TYPE
;
/**
* Default constructor
* Constructs a non-valid AttributeHandler (i.e. not linked to any attribute)
*/
AttributeHandler
()
;
/**
* Constructor
* @param m the map which belong attribute
...
...
@@ -60,8 +98,6 @@ public:
*/
AttributeHandler
(
GenericMap
*
m
,
AttributeMultiVector
<
T
>*
amv
)
;
AttributeHandler
()
;
/**
* Copy constructor
* @param ta the table attribute
...
...
@@ -79,11 +115,6 @@ public:
*/
virtual
~
AttributeHandler
()
;
/**
* get associated map
*/
GenericMap
*
map
()
const
;
/**
* get attribute data vector
*/
...
...
@@ -104,14 +135,6 @@ public:
*/
const
std
::
string
&
name
()
const
;
/**
* check if the attribute handler is linked to a valid attribute
* -> MUST BE USED AFTER A CALL TO :
* getAttribute(unsigned int orbit, const std::string& nameAttr)
* addAttribute(unsigned int orbit, const std::string& nameAttr)
*/
bool
isValid
()
const
;
/**
* [] operator with dart parameter
*/
...
...
@@ -143,7 +166,7 @@ public:
unsigned
int
newElt
()
;
/**
*
*
initialize all the lines of the attribute with the given value
*/
void
setAllValues
(
T
&
v
)
;
...
...
include/Topology/generic/attributeHandler.hpp
View file @
8fb58c43
...
...
@@ -26,35 +26,72 @@ namespace CGoGN
{
template
<
typename
T
>
AttributeHandler
<
T
>::
AttributeHandler
(
GenericMap
*
m
,
AttributeMultiVector
<
T
>*
amv
)
:
m_map
(
m
),
m_attrib
(
amv
)
{}
void
AttributeHandler
<
T
>::
registerInMap
()
{
m_map
->
attributeHandlers
.
insert
(
std
::
pair
<
AttributeMultiVectorGen
*
,
AttributeHandlerGen
*>
(
m_attrib
,
this
))
;
}
template
<
typename
T
>
AttributeHandler
<
T
>::
AttributeHandler
()
:
m_map
(
NULL
),
m_attrib
(
NULL
)
{}
void
AttributeHandler
<
T
>::
unregisterFromMap
()
{
typedef
std
::
multimap
<
AttributeMultiVectorGen
*
,
AttributeHandlerGen
*>::
iterator
IT
;
std
::
pair
<
IT
,
IT
>
bounds
=
m_map
->
attributeHandlers
.
equal_range
(
m_attrib
)
;
for
(
IT
i
=
bounds
.
first
;
i
!=
bounds
.
second
;
++
i
)
{
if
((
*
i
).
second
==
this
)
{
m_map
->
attributeHandlers
.
erase
(
i
)
;
return
;
}
}
assert
(
false
||
!
"Should not get here"
)
;
}
// =================================================================
template
<
typename
T
>
AttributeHandler
<
T
>::
AttributeHandler
(
const
AttributeHandler
<
T
>&
ta
)
:
m_map
(
ta
.
m_map
),
m_attrib
(
ta
.
m_attrib
)
AttributeHandler
<
T
>::
AttributeHandler
(
)
:
AttributeHandlerGen
(
NULL
,
false
),
m_attrib
(
NULL
)
{}
template
<
typename
T
>
AttributeHandler
<
T
>::
AttributeHandler
(
GenericMap
*
m
,
AttributeMultiVector
<
T
>*
amv
)
:
AttributeHandlerGen
(
m
,
false
),
m_attrib
(
amv
)
{
if
(
amv
!=
NULL
&&
amv
->
getIndex
()
!=
AttributeContainer
::
UNKNOWN
)
{
valid
=
true
;
registerInMap
()
;
}
else
valid
=
false
;
}
template
<
typename
T
>
AttributeHandler
<
T
>::
AttributeHandler
(
const
AttributeHandler
<
T
>&
ta
)
:
AttributeHandlerGen
(
ta
.
m_map
,
ta
.
valid
),
m_attrib
(
ta
.
m_attrib
)
{
if
(
valid
)
registerInMap
()
;
}
template
<
typename
T
>
inline
void
AttributeHandler
<
T
>::
operator
=
(
const
AttributeHandler
<
T
>&
ta
)
{
if
(
valid
)
unregisterFromMap
()
;
m_map
=
ta
.
m_map
;
m_attrib
=
ta
.
m_attrib
;
valid
=
ta
.
valid
;
if
(
valid
)
registerInMap
()
;
}
template
<
typename
T
>
AttributeHandler
<
T
>::~
AttributeHandler
()
{}
template
<
typename
T
>
GenericMap
*
AttributeHandler
<
T
>::
map
()
const
{
return
m_map
;
if
(
valid
)
unregisterFromMap
()
;
}
template
<
typename
T
>
...
...
@@ -81,31 +118,23 @@ const std::string& AttributeHandler<T>::name() const
return
m_attrib
->
getName
()
;
}
template
<
typename
T
>
bool
AttributeHandler
<
T
>::
isValid
()
const
{
return
!
(
m_map
==
NULL
||
m_attrib
==
NULL
||
m_attrib
->
getIndex
()
==
AttributeContainer
::
UNKNOWN
)
;
}
template
<
typename
T
>
inline
T
&
AttributeHandler
<
T
>::
operator
[](
Dart
d
)
{
assert
(
isValid
()
||
!
"Invalid AttributeHandler"
)
;
assert
(
valid
||
!
"Invalid AttributeHandler"
)
;
unsigned
int
orbit
=
m_attrib
->
getOrbit
()
;
unsigned
int
a
=
m_map
->
getEmbedding
(
orbit
,
d
)
;
if
(
a
==
EMBNULL
)
a
=
m_map
->
embedNewCell
(
orbit
,
d
);
a
=
m_map
->
embedNewCell
(
orbit
,
d
)
;
return
m_attrib
->
operator
[](
a
);
return
m_attrib
->
operator
[](
a
)
;
}
template
<
typename
T
>
inline
const
T
&
AttributeHandler
<
T
>::
operator
[](
Dart
d
)
const
{
assert
(
isValid
()
||
!
"Invalid AttributeHandler"
)
;
assert
(
valid
||
!
"Invalid AttributeHandler"
)
;
unsigned
int
a
=
m_map
->
getEmbedding
(
m_attrib
->
getOrbit
(),
d
)
;
return
m_attrib
->
operator
[](
a
)
;
}
...
...
@@ -113,32 +142,32 @@ inline const T& AttributeHandler<T>::operator[](Dart d) const
template
<
typename
T
>
inline
T
&
AttributeHandler
<
T
>::
operator
[](
unsigned
int
a
)
{
assert
(
isValid
()
||
!
"Invalid AttributeHandler"
)
;
return
m_attrib
->
operator
[](
a
);
assert
(
valid
||
!
"Invalid AttributeHandler"
)
;
return
m_attrib
->
operator
[](
a
)
;
}
template
<
typename
T
>
inline
const
T
&
AttributeHandler
<
T
>::
operator
[](
unsigned
int
a
)
const
{
assert
(
isValid
()
||
!
"Invalid AttributeHandler"
)
;
return
m_attrib
->
operator
[](
a
);
assert
(
valid
||
!
"Invalid AttributeHandler"
)
;
return
m_attrib
->
operator
[](
a
)
;
}
template
<
typename
T
>
inline
unsigned
int
AttributeHandler
<
T
>::
insert
(
const
T
&
elt
)
{
assert
(
isValid
()
||
!
"Invalid AttributeHandler"
)
;
unsigned
int
idx
=
m_map
->
getAttributeContainer
(
m_attrib
->
getOrbit
()).
insertLine
();
m_attrib
->
operator
[](
idx
)
=
elt
;
return
idx
;
assert
(
valid
||
!
"Invalid AttributeHandler"
)
;
unsigned
int
idx
=
m_map
->
getAttributeContainer
(
m_attrib
->
getOrbit
()).
insertLine
()
;
m_attrib
->
operator
[](
idx
)
=
elt
;
return
idx
;
}
template
<
typename
T
>
inline
unsigned
int
AttributeHandler
<
T
>::
newElt
()
{
assert
(
isValid
()
||
!
"Invalid AttributeHandler"
)
;
unsigned
int
idx
=
m_map
->
getAttributeContainer
(
m_attrib
->
getOrbit
()).
insertLine
();
return
idx
;
assert
(
valid
||
!
"Invalid AttributeHandler"
)
;
unsigned
int
idx
=
m_map
->
getAttributeContainer
(
m_attrib
->
getOrbit
()).
insertLine
()
;
return
idx
;
}
template
<
typename
T
>
...
...
@@ -151,22 +180,22 @@ inline void AttributeHandler<T>::setAllValues(T& v)
template
<
typename
T
>
inline
unsigned
int
AttributeHandler
<
T
>::
begin
()
const
{
assert
(
isValid
()
||
!
"Invalid AttributeHandler"
)
;
return
m_map
->
getAttributeContainer
(
m_attrib
->
getOrbit
()).
begin
();
assert
(
valid
||
!
"Invalid AttributeHandler"
)
;
return
m_map
->
getAttributeContainer
(
m_attrib
->
getOrbit
()).
begin
()
;
}
template
<
typename
T
>
inline
unsigned
int
AttributeHandler
<
T
>::
end
()
const
{
assert
(
isValid
()
||
!
"Invalid AttributeHandler"
)
;
return
m_map
->
getAttributeContainer
(
m_attrib
->
getOrbit
()).
end
();
assert
(
valid
||
!
"Invalid AttributeHandler"
)
;
return
m_map
->
getAttributeContainer
(
m_attrib
->
getOrbit
()).
end
()
;
}
template
<
typename
T
>
inline
void
AttributeHandler
<
T
>::
next
(
unsigned
int
&
iter
)
const
{
assert
(
isValid
()
||
!
"Invalid AttributeHandler"
)
;
m_map
->
getAttributeContainer
(
m_attrib
->
getOrbit
()).
next
(
iter
);
assert
(
valid
||
!
"Invalid AttributeHandler"
)
;
m_map
->
getAttributeContainer
(
m_attrib
->
getOrbit
()).
next
(
iter
)
;
}
}
//namespace CGoGN
include/Topology/generic/autoAttributeHandler.h
View file @
8fb58c43
...
...
@@ -55,13 +55,15 @@ public:
AttributeContainer
&
cellCont
=
this
->
m_map
->
m_attribs
[
orbit
]
;
AttributeMultiVector
<
T
>*
amv
=
cellCont
.
addAttribute
<
T
>
(
nameAttr
)
;
this
->
m_attrib
=
amv
;
this
->
valid
=
true
;
this
->
registerInMap
()
;
}
~
AutoAttributeHandler
()
{
reinterpret_cast
<
AttribMap
*>
(
this
->
m_map
)
->
removeAttribute
<
T
>
(
*
this
)
;
}
};
}
;
}
// namespace CGoGN
...
...
include/Topology/generic/cellmarker.h
View file @
8fb58c43
...
...
@@ -49,19 +49,19 @@ protected:
public:
/**
* constructor
* @param map the map on which we work
(not stored use to get table of markers and new marker.
* @param map the map on which we work
* @param cell the type of cell we want to mark VERTEX, EDGE,...
*/
CellMarkerGen
(
AttribMap
&
map
,
unsigned
int
cell
,
unsigned
int
thread
=
0
)
:
m_map
(
map
),
m_cell
(
cell
),
m_thread
(
thread
)
{
if
(
!
map
.
isOrbitEmbedded
(
cell
))
map
.
addEmbedding
(
cell
)
;
m_mark
=
m
ap
.
getNewMark
(
cell
,
thread
)
;
m_mark
=
m
_map
.
m_marksets
[
m_cell
][
m_thread
].
getNewMark
(
)
;
}
virtual
~
CellMarkerGen
()
{
m_map
.
releaseMark
(
m_mark
,
m_cell
,
m_thread
)
;
m_map
.
m_marksets
[
m_cell
][
m_thread
].
releaseMark
(
m_mark
)
;
}
protected:
...
...
include/Topology/generic/dartmarker.h
View file @
8fb58c43
...
...
@@ -98,9 +98,9 @@ public:
class
DartMarkerGen
{
protected:
Mark
m_mark
;
GenericMap
&
m_map
;
unsigned
int
m_thread
;
GenericMap
&
m_map
;
unsigned
int
m_thread
;
Mark
m_mark
;
public:
/**
...
...
@@ -109,17 +109,17 @@ public:
*/
DartMarkerGen
(
GenericMap
&
map
)
:
m_map
(
map
),
m_thread
(
0
)
{
m_mark
=
m
ap
.
getNewMark
(
DART
)
;
m_mark
=
m
_map
.
m_marksets
[
DART
][
m_thread
].
getNewMark
()
;
}
DartMarkerGen
(
GenericMap
&
map
,
unsigned
int
thread
)
:
m_map
(
map
),
m_thread
(
thread
)
{
m_mark
=
m
ap
.
getNewMark
(
DART
,
thread
)
;
m_mark
=
m
_map
.
m_marksets
[
DART
][
m_thread
].
getNewMark
()
;
}
virtual
~
DartMarkerGen
()
{
m_map
.
releaseMark
(
m_mark
,
DART
,
m_thread
)
;
m_map
.
m_marksets
[
DART
][
m_thread
].
releaseMark
(
m_mark
)
;
}
protected:
...
...
include/Topology/generic/genericmap.h
View file @
8fb58c43
...
...
@@ -71,10 +71,13 @@ public:
virtual
void
next
(
Dart
&
d
)
=
0
;
};
class
AttributeHandlerGen
;
class
GenericMap
:
public
MapBrowser
{
friend
class
DartMarkerGen
;
template
<
typename
T
>
friend
class
AttributeHandler
;
template
<
typename
T
>
friend
class
AutoAttributeHandler
;
protected:
...
...
@@ -99,18 +102,28 @@ protected:
/**
* Direct access to the attributes that store Marks
*/
AttributeMultiVector
<
Mark
>*
m_markTables
[
NB_ORBITS
][
NB_THREAD
];
AttributeMultiVector
<
Mark
>*
m_markTables
[
NB_ORBITS
][
NB_THREAD
]
;
unsigned
int
m_nbThreads
;
unsigned
int
m_nbThreads
;
std
::
multimap
<
AttributeMultiVectorGen
*
,
AttributeHandlerGen
*>
attributeHandlers
;
public:
static
const
unsigned
int
UNKNOWN_ATTRIB
=
AttributeContainer
::
UNKNOWN
;
GenericMap
();
GenericMap
()
;
~
GenericMap
();
~
GenericMap
()
;
virtual
std
::
string
mapTypeName
()
=
0
;
virtual
std
::
string
mapTypeName
()
=
0
;
/**
* Clear the map
* @param removeAttrib
* if false -> data is deleted but all attributes remain (all AttributeHandlers are still valid)
* if true -> data and attributes are deleted (AttributeHandlers are invalid)
*/
virtual
void
clear
(
bool
removeAttrib
)
;
/****************************************
* DARTS MANAGEMENT *
...
...
@@ -119,12 +132,12 @@ protected:
/**
* Add a dart to the map
*/
virtual
Dart
newDart
();
virtual
Dart
newDart
()
;
/**
* Erase a dart of the map
*/
void
deleteDart
(
Dart
d
);
void
deleteDart
(
Dart
d
)
;
public:
/**
...
...
@@ -135,7 +148,7 @@ public:
/**
* @return the number of darts in the map
*/
unsigned
int
getNbDarts
();
unsigned
int
getNbDarts
()
;
/****************************************
* EMBEDDING MANAGEMENT *
...
...
@@ -144,29 +157,24 @@ public:
/**
* tell if an orbit is embedded or not
*/
<