IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antonio Augusto Alves Junior
corsika
Commits
af5447ad
Commit
af5447ad
authored
5 years ago
by
Hans Dembinski
Browse files
Options
Downloads
Patches
Plain Diff
simplify Stack
parent
92b43fbf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/StackInterface/Stack.h
+8
-16
8 additions, 16 deletions
Framework/StackInterface/Stack.h
with
8 additions
and
16 deletions
Framework/StackInterface/Stack.h
+
8
−
16
View file @
af5447ad
...
...
@@ -56,8 +56,7 @@ namespace corsika::stack {
template
<
typename
StackDataType
,
template
<
typename
>
typename
ParticleInterface
>
class
Stack
{
using
StackType
=
Stack
<
StackDataType
,
ParticleInterface
>
;
using
StackDataValueType
=
std
::
remove_reference_t
<
StackDataType
>
;
StackDataType
fData
;
///< this in general holds all the data and can be quite big
...
...
@@ -113,11 +112,9 @@ namespace corsika::stack {
* ParticleInterface template class simultaneously.
*/
using
StackIterator
=
StackIteratorInterface
<
typename
std
::
remove_reference
<
StackDataType
>::
type
,
ParticleInterface
,
StackType
>
;
StackIteratorInterface
<
StackDataValueType
,
ParticleInterface
,
Stack
>
;
using
ConstStackIterator
=
ConstStackIteratorInterface
<
typename
std
::
remove_reference
<
StackDataType
>::
type
,
ParticleInterface
,
StackType
>
;
ConstStackIteratorInterface
<
StackDataValueType
,
ParticleInterface
,
Stack
>
;
/**
* this is the full type of the user-declared ParticleInterface
...
...
@@ -130,12 +127,9 @@ namespace corsika::stack {
using
ParticleType
=
StackIterator
;
// friends are needed since they need access to protected members
friend
class
StackIteratorInterface
<
typename
std
::
remove_reference
<
StackDataType
>::
type
,
ParticleInterface
,
StackType
>
;
friend
class
ConstStackIteratorInterface
<
typename
std
::
remove_reference
<
StackDataType
>::
type
,
ParticleInterface
,
StackType
>
;
friend
class
StackIteratorInterface
<
StackDataValueType
,
ParticleInterface
,
Stack
>
;
friend
class
ConstStackIteratorInterface
<
StackDataValueType
,
ParticleInterface
,
Stack
>
;
public
:
/**
...
...
@@ -247,10 +241,8 @@ namespace corsika::stack {
* @name Return reference to StackDataType object fData for data access
* @{
*/
typename
std
::
remove_reference
<
StackDataType
>::
type
&
GetStackData
()
{
return
fData
;
}
const
typename
std
::
remove_reference
<
StackDataType
>::
type
&
GetStackData
()
const
{
return
fData
;
}
StackDataValueType
&
GetStackData
()
{
return
fData
;
}
const
StackDataValueType
&
GetStackData
()
const
{
return
fData
;
}
///@}
};
...
...
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