@@ -16,19 +16,9 @@ namespace ENDFtk {
16
16
HeadRecord&
17
17
asHead ( StructureDivision& record );
18
18
19
- HeadRecord&
20
- asHead ( double expectedZA,
21
- double expectedAtomicWeightRatio,
22
- StructureDivision& record );
23
-
24
19
const HeadRecord&
25
20
asHead ( const StructureDivision& record );
26
21
27
- const HeadRecord&
28
- asHead ( double expectedZA,
29
- double expectedAtomicWeightRatio,
30
- const StructureDivision& record );
31
-
32
22
class HeadRecord : protected StructureDivision {
33
23
public:
34
24
@@ -38,22 +28,24 @@ namespace ENDFtk {
38
28
template < std::size_t index >
39
29
using ImmutableReturnType = Base::ImmutableReturnType< index >;
40
30
41
- HeadRecord ( double C1 , double C2, long L1, long L2, long N1, long N2,
31
+ HeadRecord ( int ZA , double C2, long L1, long L2, long N1, long N2,
42
32
int MAT, int MF, int MT ) :
43
- StructureDivision ( C1, C2, L1, L2, N1, N2, MAT, MF, MT ) {}
33
+ StructureDivision ( static_cast < double >( ZA ), C2,
34
+ L1, L2, N1, N2, MAT, MF, MT ) {}
44
35
45
36
template < typename Iterator >
46
37
HeadRecord ( Iterator& it, const Iterator& end, long & lineNumber )
47
38
: StructureDivision(it, end, lineNumber) { /* Do nothing */ }
48
39
40
+ int ZA () const {
41
+
42
+ return static_cast < int >( std::round ( std::get< 0 >( this ->base .fields ) ) );
43
+ }
44
+
49
45
#define DEFINE_BASE_GETTER ( name, position ) \
50
- MutableReturnType< position > \
51
- name (){ return std::get< position >( this ->base .fields ); } \
52
- \
53
46
ImmutableReturnType< position > \
54
47
name () const { return std::get< position >( this ->base .fields ); }
55
48
56
- DEFINE_BASE_GETTER ( ZA, 0 )
57
49
DEFINE_BASE_GETTER ( atomicWeightRatio, 1 )
58
50
DEFINE_BASE_GETTER ( AWR, 1 )
59
51
DEFINE_BASE_GETTER ( L1, 2 )
@@ -64,9 +56,6 @@ namespace ENDFtk {
64
56
#undef DEFINE_BASE_GETTER
65
57
66
58
#define DEFINE_TAIL_GETTER ( name ) \
67
- decltype ( StructureDivision::tail.name() ) \
68
- name (){ return this ->tail .name (); } \
69
- \
70
59
decltype ( std::declval \
71
60
< typename std::add_const \
72
61
< decltype( StructureDivision::tail ) >::type >().name() ) \
0 commit comments