File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -281,6 +281,7 @@ class Attributable
281
281
282
282
/* * Reconstructs a path that can be passed to a Series constructor */
283
283
std::string filePath () const ;
284
+ std::string printGroup () const ;
284
285
};
285
286
286
287
/* *
Original file line number Diff line number Diff line change 28
28
#include < complex>
29
29
#include < iostream>
30
30
#include < set>
31
+ #include < sstream>
31
32
32
33
namespace openPMD
33
34
{
@@ -197,6 +198,21 @@ std::string Attributable::MyPath::filePath() const
197
198
return directory + seriesName + seriesExtension;
198
199
}
199
200
201
+ std::string Attributable::MyPath::printGroup () const
202
+ {
203
+ std::stringstream res;
204
+ if (this ->group .empty ())
205
+ {
206
+ return res.str ();
207
+ }
208
+ res << *this ->group .begin ();
209
+ for (auto it = ++this ->group .begin (); it != this ->group .end (); ++it)
210
+ {
211
+ res << ' /' << *it;
212
+ }
213
+ return res.str ();
214
+ }
215
+
200
216
auto Attributable::myPath () const -> MyPath
201
217
{
202
218
MyPath res;
You can’t perform that action at this time.
0 commit comments