Rocstar
1.0
Rocstar multiphysics simulation application
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
FaceList.hpp
Go to the documentation of this file.
1
#ifndef FACELIST_HPP
2
#define FACELIST_HPP
3
4
#include "
general.hpp
"
5
#include "
Face.hpp
"
6
7
class
FaceList
{
8
public
:
9
10
FaceList
();
11
FaceList
(
const
FaceList
& olist );
12
~FaceList
();
13
14
const
FaceList
&
operator=
(
const
FaceList
& olist);
15
16
void
append
(
Face
* val);
17
void
insert
(
Face
* val);
18
void
insert_first
(
Face
* val);
19
20
void
reset
();
21
void
next
();
22
23
Face
*
get
();
24
Face
*
remove
();
25
26
boolean
empty
();
27
int
size
();
28
29
boolean
move_to
(
Face
* val);
30
int
index
()
const
;
31
void
index
(
int
ind );
32
33
private
:
34
35
struct
Elem
{
36
Face
*
d_val
;
37
Elem
*
d_next
;
38
39
Elem
() :
d_val
(0),
d_next
(0) {}
40
Elem
(
Face
* val,
Elem
* next = 0) :
41
d_val
(val),
d_next
(next) {}
42
43
~Elem
() {
44
if
(
d_next
)
delete
d_next
;
45
}
46
};
47
48
Elem
*
d_first
;
49
Elem
*
d_current
;
50
51
int
d_size
;
52
};
53
54
55
inline
void
FaceList::insert
(
Face
* val) {
// at d_current
56
if
( !
d_current
&&
d_first
){
57
cerr <<
" Gevalt - insert\n"
;
58
return
;
59
}
60
d_size
++;
61
if
( !
d_current
){
62
d_first
=
new
FaceList::Elem
( val );
63
d_current
=
d_first
;
64
return
;
65
}
66
d_current
->
d_next
=
new
Elem
( val,
d_current
->
d_next
);
67
}
68
69
inline
void
FaceList::insert_first
(
Face
* val) {
// at d_current
70
d_size
++;
71
d_first
=
new
FaceList::Elem
( val,
d_first
);
72
d_current
=
d_first
;
73
}
74
75
76
inline
void
FaceList::reset
() {
77
d_current
=
d_first
;
78
}
79
80
inline
void
FaceList::next
() {
81
d_current
=
d_current
->
d_next
;
82
if
( !
d_current
){
83
d_current
=
d_first
;
84
}
85
}
86
87
inline
Face
*
FaceList::get
() {
88
return
d_current
->
d_val
;
89
}
90
91
inline
boolean
FaceList::empty
(){
92
return
(
d_size
<= 0 ?
TRUE
:
FALSE
);
93
}
94
95
inline
int
FaceList::size
(){
96
return
d_size
;
97
}
98
99
100
#endif
101
102
103
104
FALSE
#define FALSE
Definition:
vinci.h:133
FaceList::Elem::~Elem
~Elem()
Definition:
FaceList.hpp:43
FaceList
Definition:
FaceList.hpp:7
FaceList::Elem
Definition:
FaceList.hpp:35
Face.hpp
FaceList::operator=
const FaceList & operator=(const FaceList &olist)
Definition:
FaceList.cpp:35
FaceList::Elem::d_next
Elem * d_next
Definition:
FaceList.hpp:37
general.hpp
FaceList::size
int size()
Definition:
FaceList.hpp:95
FaceList::index
int index() const
Definition:
FaceList.cpp:110
FaceList::FaceList
FaceList()
Definition:
FaceList.cpp:5
FaceList::Elem::Elem
Elem(Face *val, Elem *next=0)
Definition:
FaceList.hpp:40
FaceList::d_current
Elem * d_current
Definition:
FaceList.hpp:49
FaceList::next
void next()
Definition:
FaceList.hpp:80
FaceList::Elem::d_val
Face * d_val
Definition:
FaceList.hpp:36
TRUE
#define TRUE
Definition:
vinci.h:134
FaceList::reset
void reset()
Definition:
FaceList.hpp:76
FaceList::append
void append(Face *val)
Definition:
FaceList.cpp:58
FaceList::~FaceList
~FaceList()
Definition:
FaceList.cpp:31
FaceList::d_first
Elem * d_first
Definition:
FaceList.hpp:48
FaceList::move_to
boolean move_to(Face *val)
Definition:
FaceList.cpp:102
FaceList::get
Face * get()
Definition:
FaceList.hpp:87
FaceList::insert
void insert(Face *val)
Definition:
FaceList.hpp:55
FaceList::Elem::Elem
Elem()
Definition:
FaceList.hpp:39
FaceList::d_size
int d_size
Definition:
FaceList.hpp:51
FaceList::empty
boolean empty()
Definition:
FaceList.hpp:91
Face
The Face class is an abstract base class that supplies implemented general methods, as well as a vew virtual interface methods to child classes.
Definition:
Face.hpp:19
FaceList::insert_first
void insert_first(Face *val)
Definition:
FaceList.hpp:69
Rocfrac
utilities
CohIn
FaceList.hpp
Generated on Wed Nov 30 2016 16:56:07 for Rocstar by
1.8.5