TkN 2.7
Toolkit for Nuclei
Loading...
Searching...
No Matches
tkensdf_ident_rec.cpp
1/********************************************************************************
2 * Copyright (c) : Université de Lyon 1, CNRS/IN2P3, UMR5822, *
3 * IP2I, F-69622 Villeurbanne Cedex, France *
4 * Normandie Université, ENSICAEN, UNICAEN, CNRS/IN2P3, *
5 * LPC Caen, F-14000 Caen, France *
6 * Contibutor(s) : *
7 * Jérémie Dudouet jeremie.dudouet@cnrs.fr [2020] *
8 * Diego Gruyer diego.gruyer@cnrs.fr [2020] *
9 * *
10 * Licensed under the MIT License <http://opensource.org/licenses/MIT>. *
11 * SPDX-License-Identifier: MIT *
12 ********************************************************************************/
13
14#include "tkensdf_ident_rec.h"
15
16namespace tkn {
23}
24
25using namespace tkn;
26
31
33 tkensdf_record(ident_record),
34 fnuclide(ident_record.fnuclide),
35 fdsid(ident_record.fdsid),
36 fdsref(ident_record.fdsref),
37 fpub(ident_record.fpub),
38 fdate(ident_record.fdate),
39 fbytePosition(ident_record.fbytePosition),
40 fis_adopted(ident_record.fis_adopted)
41{
42 fposition.first = ident_record.fposition.first;
43 fposition.second = ident_record.fposition.second;
45}
46
48{
49 frecord = _record;
51 return true;
52}
53
55{
56 fnuclide = get_nuclide();
57 fdsid = get_dsid();
58 fdsref = get_dsref();
59 fpub = get_pub();
60 fdate = get_date();
61}
62
64{
65 fnuclide = " ";
66 fdsid = " ";
67 fdsref = " ";
68 fpub = " ";
69 fdate = " ";
70 fposition.first = fposition.second = fcurrentPosition = 0;
71 fbytePosition = std::streampos{};
72}
73
74void tkensdf_ident_rec::print(std::ostream &out) const
75{
76 out << "Nuclide " << fnuclide << " with id " << fdsid << " ref: " << fdsref << " Pub: " << fpub << " Date: " << fdate
77 << " at position " << fposition.first << " " << fposition.second << std::endl;
78}
void print(std::ostream &) const override
virtual void analyse_record() override
analyse the record content
virtual bool set_record(const tkstring &_record) override
define the record from a string
std::pair< int, int > fposition
std::string with usefull tricks from TString (ROOT) and KVString (KaliVeda) and more....
Definition tkstring.h:33
Definition tklog.cpp:16