Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
bbeed7db
Commit
bbeed7db
authored
Dec 18, 2013
by
COULAUD Olivier
Browse files
Add << operator
parent
34a5f212
Changes
1
Hide whitespace changes
Inline
Side-by-side
Src/Utils/FSpherical.hpp
View file @
bbeed7db
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
// ===================================================================================
// ===================================================================================
#ifndef FSPHERICAL_HPP
#ifndef FSPHERICAL_HPP
#define FSPHERICAL_HPP
#define FSPHERICAL_HPP
#include <iostream>
#include "FGlobal.hpp"
#include "FGlobal.hpp"
#include "FMath.hpp"
#include "FMath.hpp"
...
@@ -108,6 +109,21 @@ public:
...
@@ -108,6 +109,21 @@ public:
FReal
getSinTheta
()
const
{
FReal
getSinTheta
()
const
{
return
sinTheta
;
return
sinTheta
;
}
}
/**
* Operator stream FPoint to std::ostream
* This can be used to simpldata[1] write out a position
* @param[in,out] output where to write the position
* @param[in] inPosition the position to write out
* @return the output for multiple << operators
*/
template
<
class
StreamClass
>
friend
StreamClass
&
operator
<<
(
StreamClass
&
output
,
const
FSpherical
&
inPosition
){
output
<<
"("
<<
inPosition
.
getR
()
<<
", "
<<
inPosition
.
getPhi
()
<<
", "
<<
inPosition
.
getTheta
()
<<
")"
;
return
output
;
// for multiple << operators.
}
};
};
#endif // FSPHERICAL_HPP
#endif // FSPHERICAL_HPP
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment