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
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
Pranav Sampathkumar
corsika
Commits
95724831
Commit
95724831
authored
4 years ago
by
Remy Prechelt
Browse files
Options
Downloads
Patches
Plain Diff
Add NoOutput class to disable output writing.
parent
55d7e99a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
corsika/detail/output/NoOutput.inl
+30
-0
30 additions, 0 deletions
corsika/detail/output/NoOutput.inl
corsika/output/NoOutput.hpp
+66
-0
66 additions, 0 deletions
corsika/output/NoOutput.hpp
with
96 additions
and
0 deletions
corsika/detail/output/NoOutput.inl
0 → 100644
+
30
−
0
View file @
95724831
/*
* (c) Copyright 2021 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#pragma once
namespace
corsika
{
NoOutput
::
NoOutput
()
:
{}
void
NoOutput
::
startOfRun
(
std
::
filesystem
::
path
const
&
directory
)
{}
void
NoOutput
::
startOfEvent
()
{}
void
NoOutput
::
endOfEvent
()
{}
void
NoOutput
::
endOfRun
()
{}
YAML
::
Node
NoOutput
::
getConfig
()
const
{
return
YAML
::
Node
();
}
YAML
::
Node
NoOutput
::
getFinalOutput
()
const
{
return
YAML
::
Node
();
}
template
<
typename
...
TVArgs
>
void
NoOutput
::
write
(
TVArgs
&&
args
...)
{}
}
// namespace corsika
This diff is collapsed.
Click to expand it.
corsika/output/NoOutput.hpp
0 → 100644
+
66
−
0
View file @
95724831
/*
* (c) Copyright 2021 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#pragma once
#include
<corsika/output/BaseOutput.hpp>
namespace
corsika
{
/**
* This class can be used as a drop-in for any output template
* and doesn't write *any* output files.
*
*/
class
NoOutput
:
public
BaseOutput
{
public:
/**
* Construct a blank output.
*/
NoOutput
();
/**
* Called at the start of each run.
*/
virtual
void
startOfRun
(
std
::
filesystem
::
path
const
&
directory
)
final
override
;
/**
* Called at the start of each event/shower.
*/
virtual
void
startOfEvent
()
final
override
;
/**
* Called at the end of each event/shower.
*/
virtual
void
endOfEvent
()
final
override
;
/**
* Called at the end of each run.
*/
virtual
void
endOfRun
()
final
override
;
/**
* Get the configuration of this output.
*/
virtual
YAML
::
Node
getConfig
()
const
final
override
;
/**
* Accept any arguments and ignore them.
*/
template
<
typename
...
TVArgs
>
void
write
(
TVArgs
&&
args
...);
/**
* Get final text outputs for the config file.
*/
virtual
YAML
::
Node
getFinalOutput
()
const
final
override
;
};
}
// namespace corsika
#include
<corsika/detail/output/NoOutput.inl>
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