Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
6245295a
There was an error fetching the commit references. Please try again later.
Commit
6245295a
authored
15 years ago
by
Tomáš Oberhuber
Browse files
Options
Downloads
Patches
Plain Diff
Renaming mDataElement to tnlDataElement.
parent
22aad12b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/core/Makefile.am
+1
-1
1 addition, 1 deletion
src/core/Makefile.am
src/core/tnlDataElement.h
+13
-13
13 additions, 13 deletions
src/core/tnlDataElement.h
src/core/tnlList.h
+13
-13
13 additions, 13 deletions
src/core/tnlList.h
with
27 additions
and
27 deletions
src/core/Makefile.am
+
1
−
1
View file @
6245295a
...
...
@@ -13,7 +13,7 @@ EXTRA_DIST = tnlConfigDescriptionParser.y \
headers
=
\
tnlConfigDescription.h
\
tnlCurve.h
\
m
DataElement.h
\
tnl
DataElement.h
\
mField1D.h
\
mField2D.h
\
mField3D.h
\
...
...
This diff is collapsed.
Click to expand it.
src/core/
m
DataElement.h
→
src/core/
tnl
DataElement.h
+
13
−
13
View file @
6245295a
/***************************************************************************
m
DataElement.h - description
tnl
DataElement.h - description
-------------------
begin : 2004/04/11 14:01
copyright : (C) 2004 by Tomas Oberhuber
...
...
@@ -19,33 +19,33 @@
#define __mDATAELEMENT_H__
//! Data element for tnlList and mStack
template
<
class
T
>
class
m
DataElement
template
<
class
T
>
class
tnl
DataElement
{
//! Main data
T
data
;
//! Pointer to the next element
m
DataElement
<
T
>*
next
;
tnl
DataElement
<
T
>*
next
;
//! Pointer to the previous element
m
DataElement
<
T
>*
previous
;
tnl
DataElement
<
T
>*
previous
;
public:
//! Basic constructor
m
DataElement
()
tnl
DataElement
()
:
next
(
0
),
previous
(
0
){};
//! Constructor with given data and possibly pointer to next element
m
DataElement
(
const
T
&
dt
,
m
DataElement
<
T
>*
prv
=
0
,
m
DataElement
<
T
>*
nxt
=
0
)
tnl
DataElement
(
const
T
&
dt
,
tnl
DataElement
<
T
>*
prv
=
0
,
tnl
DataElement
<
T
>*
nxt
=
0
)
:
data
(
dt
),
next
(
nxt
),
previous
(
prv
){};
//! Destructor
~
m
DataElement
(){};
~
tnl
DataElement
(){};
//! Return data for non-const instances
T
&
Data
()
{
return
data
;
};
...
...
@@ -54,16 +54,16 @@ template< class T > class mDataElement
const
T
&
Data
()
const
{
return
data
;
};
//! Return pointer to the next element for non-const instances
m
DataElement
<
T
>*&
Next
()
{
return
next
;
};
tnl
DataElement
<
T
>*&
Next
()
{
return
next
;
};
//! Return pointer to the next element for const instances
const
m
DataElement
<
T
>*
Next
()
const
{
return
next
;
};
const
tnl
DataElement
<
T
>*
Next
()
const
{
return
next
;
};
//! Return pointer to the previous element for non-const instances
m
DataElement
<
T
>*&
Previous
()
{
return
previous
;
};
tnl
DataElement
<
T
>*&
Previous
()
{
return
previous
;
};
//! Return pointer to the previous element for const instances
const
m
DataElement
<
T
>*
Previous
()
const
{
return
previous
;
};
const
tnl
DataElement
<
T
>*
Previous
()
const
{
return
previous
;
};
};
...
...
This diff is collapsed.
Click to expand it.
src/core/tnlList.h
+
13
−
13
View file @
6245295a
...
...
@@ -25,7 +25,7 @@
#include
<assert.h>
#include
<stdlib.h>
#include
<iostream>
#include
"
m
DataElement.h"
#include
"
tnl
DataElement.h"
#include
"tnlString.h"
#include
"param-types.h"
...
...
@@ -52,18 +52,18 @@ template< class T > class tnlList
protected:
//! Pointer to the first element
m
DataElement
<
T
>*
first
;
tnl
DataElement
<
T
>*
first
;
//! Pointer to the last element
/*! We use pointer to last element while adding new element to keep order of elements
*/
m
DataElement
<
T
>*
last
;
tnl
DataElement
<
T
>*
last
;
//! List size
long
int
size
;
//! Iterator
mutable
m
DataElement
<
T
>*
iterator
;
mutable
tnl
DataElement
<
T
>*
iterator
;
//! Iterator index
mutable
long
int
index
;
...
...
@@ -160,12 +160,12 @@ template< class T > class tnlList
if
(
!
first
)
{
assert
(
!
last
);
first
=
last
=
new
m
DataElement
<
T
>
(
data
);
first
=
last
=
new
tnl
DataElement
<
T
>
(
data
);
if
(
!
first
)
return
false
;
}
else
{
m
DataElement
<
T
>*
new_element
=
new
m
DataElement
<
T
>
(
data
,
last
,
0
);
tnl
DataElement
<
T
>*
new_element
=
new
tnl
DataElement
<
T
>
(
data
,
last
,
0
);
if
(
!
new_element
)
return
false
;
assert
(
last
);
last
=
last
->
Next
()
=
new_element
;
...
...
@@ -180,12 +180,12 @@ template< class T > class tnlList
if
(
!
first
)
{
assert
(
!
last
);
first
=
last
=
new
m
DataElement
<
T
>
(
data
);
first
=
last
=
new
tnl
DataElement
<
T
>
(
data
);
if
(
!
first
)
return
false
;
}
else
{
m
DataElement
<
T
>*
new_element
=
new
m
DataElement
<
T
>
(
data
,
0
,
first
);
tnl
DataElement
<
T
>*
new_element
=
new
tnl
DataElement
<
T
>
(
data
,
0
,
first
);
if
(
!
new_element
)
return
false
;
first
=
first
->
Previous
()
=
new_element
;
}
...
...
@@ -201,8 +201,8 @@ template< class T > class tnlList
if
(
ind
==
0
)
return
Prepend
(
data
);
if
(
ind
==
size
)
return
Append
(
data
);
operator
[](
ind
);
m
DataElement
<
T
>*
new_el
=
new
m
DataElement
<
T
>
(
data
,
tnl
DataElement
<
T
>*
new_el
=
new
tnl
DataElement
<
T
>
(
data
,
iterator
->
Previous
(),
iterator
);
if
(
!
new_el
)
return
false
;
...
...
@@ -238,7 +238,7 @@ template< class T > class tnlList
void
Erase
(
long
int
ind
)
{
operator
[](
ind
);
m
DataElement
<
T
>*
tmp_it
=
iterator
;
tnl
DataElement
<
T
>*
tmp_it
=
iterator
;
if
(
iterator
->
Next
()
)
iterator
->
Next
()
->
Previous
()
=
iterator
->
Previous
();
if
(
iterator
->
Previous
()
)
...
...
@@ -267,7 +267,7 @@ template< class T > class tnlList
void
EraseAll
()
{
iterator
=
first
;
m
DataElement
<
T
>*
tmp_it
;
tnl
DataElement
<
T
>*
tmp_it
;
while
(
iterator
)
{
tmp_it
=
iterator
;
...
...
@@ -282,7 +282,7 @@ template< class T > class tnlList
void
DeepEraseAll
()
{
iterator
=
first
;
m
DataElement
<
T
>*
tmp_it
;
tnl
DataElement
<
T
>*
tmp_it
;
while
(
iterator
)
{
tmp_it
=
iterator
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment