Serialbox  2.2.0
Data serialization library and tools for C/C++, Python and Fortran
FieldID.h
Go to the documentation of this file.
1 //===-- serialbox/core/FieldID.h ----------------------------------------------------*- C++ -*-===//
2 //
3 // S E R I A L B O X
4 //
5 // This file is distributed under terms of BSD license.
6 // See LICENSE.txt for more information
7 //
8 //===------------------------------------------------------------------------------------------===//
9 //
13 //===------------------------------------------------------------------------------------------===//
14 
15 #ifndef SERIALBOX_CORE_FIELDID_H
16 #define SERIALBOX_CORE_FIELDID_H
17 
18 #include <iosfwd>
19 #include <string>
20 
21 namespace serialbox {
22 
25 
27 struct FieldID {
28  std::string name;
29  unsigned int id;
30 };
31 
33 bool operator==(const FieldID& left, const FieldID& right);
34 
36 bool operator!=(const FieldID& left, const FieldID& right);
37 
39 std::ostream& operator<<(std::ostream& stream, const FieldID& f);
40 
42 
43 } // namespace serialbox
44 
45 #endif
unsigned int id
ID within the field.
Definition: FieldID.h:29
Namespace of the serialbox library.
Definition: Archive.h:25
Uniquely identifiy a field.
Definition: FieldID.h:27
std::string name
Name of the field.
Definition: FieldID.h:28
bool operator==(const FieldID &left, const FieldID &right)
Check for equality of FieldIDs.
Definition: FieldID.cpp:20
bool operator!=(const FieldID &left, const FieldID &right)
Check for inequality of FieldIDs.
Definition: FieldID.cpp:24
std::ostream & operator<<(std::ostream &stream, const FieldID &f)
Convert FieldID to stream.
Definition: FieldID.cpp:26