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
c6a549f1
There was an error fetching the commit references. Please try again later.
Commit
c6a549f1
authored
6 years ago
by
Nina Džugasová
Committed by
Tomáš Oberhuber
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Improved documentation of Containers/List.
parent
8baf2486
No related branches found
No related tags found
1 merge request
!15
Nina
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/TNL/Containers/List.h
+22
-5
22 additions, 5 deletions
src/TNL/Containers/List.h
with
22 additions
and
5 deletions
src/TNL/Containers/List.h
+
22
−
5
View file @
c6a549f1
...
@@ -26,9 +26,9 @@ template< class T > class ListDataElement;
...
@@ -26,9 +26,9 @@ template< class T > class ListDataElement;
/*! To acces elements in the list one can use method getSize() and
/*! To acces elements in the list one can use method getSize() and
operator[](). To add elements there are methods Append(),
operator[](). To add elements there are methods Append(),
Prepend() and Insert() to insert an element at given
Prepend() and Insert() to insert an element at given
position. To erase particular element there is me
r
thod
position. To erase particular element there is method
Erase() taking the element position. To erase all elements
Erase() taking the element position. To erase all elements
there is method
EraseAll
. There are also alternatives DeepErase()
there is method
reset()
. There are also alternatives DeepErase()
and DeepEraseAll() to free dynamicaly allocated data inside the
and DeepEraseAll() to free dynamicaly allocated data inside the
data elements.
data elements.
The list stores pointer to last accesed element so if one goes
The list stores pointer to last accesed element so if one goes
...
@@ -51,7 +51,7 @@ template< class T > class List
...
@@ -51,7 +51,7 @@ template< class T > class List
/// \brief Copy constructor.
/// \brief Copy constructor.
///
///
/// Construct a copy of \e list.
/// Construct a copy of \e list.
///
@
param list Name of another list.
///
\
param list Name of another list.
List
(
const
List
&
list
);
List
(
const
List
&
list
);
/// \brief Destructor.
/// \brief Destructor.
...
@@ -96,18 +96,27 @@ template< class T > class List
...
@@ -96,18 +96,27 @@ template< class T > class List
bool
Insert
(
const
T
&
data
,
const
int
&
ind
);
bool
Insert
(
const
T
&
data
,
const
int
&
ind
);
/// Appends copy of another list.
/// Appends copy of another list.
///
/// \param lst Name of another list.
bool
AppendList
(
const
List
<
T
>&
lst
);
bool
AppendList
(
const
List
<
T
>&
lst
);
/// Prepends copy of another list.
/// Prepends copy of another list.
///
/// \param lst Name of another list.
bool
PrependList
(
const
List
<
T
>&
lst
);
bool
PrependList
(
const
List
<
T
>&
lst
);
/// Transforms list to an \e array.
template
<
typename
Array
>
template
<
typename
Array
>
void
toArray
(
Array
&
array
);
void
toArray
(
Array
&
array
);
/// Erases data element at given position.
/// Erases data element at given position.
///
/// \param ind Index of the data element one chooses to remove.
void
Erase
(
const
int
&
ind
);
void
Erase
(
const
int
&
ind
);
/// Erases data element with contained data at given position.
/// Erases data element with contained data at given position.
///
/// \param ind Index of the data element one chooses to remove.
void
DeepErase
(
const
int
&
ind
);
void
DeepErase
(
const
int
&
ind
);
/// Erases all data elements.
/// Erases all data elements.
...
@@ -119,15 +128,23 @@ template< class T > class List
...
@@ -119,15 +128,23 @@ template< class T > class List
void
DeepEraseAll
();
void
DeepEraseAll
();
/// Saves the list in binary format.
/// Saves the list in binary format.
///
/// \param file Name of file.
bool
Save
(
File
&
file
)
const
;
bool
Save
(
File
&
file
)
const
;
/// Saves the list in binary format using method save of type T.
/// Saves the list in binary format using method save of type T.
///
/// \param file Name of file.
bool
DeepSave
(
File
&
file
)
const
;
bool
DeepSave
(
File
&
file
)
const
;
/// Loads the list.
/// Loads the list from file.
///
/// \param file Name of file.
bool
Load
(
File
&
file
);
bool
Load
(
File
&
file
);
/// Loads the list using method Load of the type T.
/// Loads the list from file using method Load of the type T.
///
/// \param file Name of file.
bool
DeepLoad
(
File
&
file
);
bool
DeepLoad
(
File
&
file
);
protected:
protected:
...
...
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