aqnwb 0.2.0
Loading...
Searching...
No Matches
Types.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <limits>
5#include <vector>
6
7namespace AQNWB
8{
9
10// Forward declaration of Channel
11class Channel;
12
16class Types
17{
18public:
22 enum Status
23 {
26 };
27
34 friend Status operator&&(Status lhs, Status rhs)
35 {
36 return (lhs == Success && rhs == Success) ? Success : Failure;
37 }
38
45 friend Status operator||(Status lhs, Status rhs)
46 {
47 return (lhs == Success || rhs == Success) ? Success : Failure;
48 }
49
54 {
55 Group = 0,
59 };
60
68 template<StorageObjectType T>
70 : std::integral_constant<bool, (T == Dataset || T == Attribute)>
71 {
72 };
73
77 using SizeType = size_t;
78
82 static constexpr SizeType SizeTypeNotSet =
83 std::numeric_limits<SizeType>::max();
84
88 using SizeArray = std::vector<size_t>;
89
93 using ChannelVector = std::vector<Channel>;
94
99 {
100 std::string name;
101 std::string version;
102
109 std::vector<std::pair<std::string_view, std::string_view>>
111 };
112};
113} // namespace AQNWB
Class for storing acquisition system channel information.
Definition Channel.hpp:16
Provides definitions for various types used in the project.
Definition Types.hpp:17
std::vector< Channel > ChannelVector
Alias for a vector of channels.
Definition Types.hpp:93
static constexpr SizeType SizeTypeNotSet
Value to use to indicate that a SizeType index is not set.
Definition Types.hpp:82
StorageObjectType
Types of object used in the NWB schema.
Definition Types.hpp:54
@ Attribute
Definition Types.hpp:57
@ Group
Definition Types.hpp:55
@ Dataset
Definition Types.hpp:56
@ Undefined
Definition Types.hpp:58
friend Status operator&&(Status lhs, Status rhs)
Overloaded && operator for Status enum.
Definition Types.hpp:34
friend Status operator||(Status lhs, Status rhs)
Overloaded || operator for Status enum.
Definition Types.hpp:45
Status
Represents the status of an operation.
Definition Types.hpp:23
@ Success
Definition Types.hpp:24
@ Failure
Definition Types.hpp:25
std::vector< size_t > SizeArray
Alias for an array of size types used in the project.
Definition Types.hpp:88
size_t SizeType
Alias for the size type used in the project.
Definition Types.hpp:77
The main namespace for AqNWB.
Definition Channel.hpp:11
Helper struct to check if a value is a data field, i.e., Dataset or Attribute.
Definition Types.hpp:71
Struct to hold namespace information.
Definition Types.hpp:99
std::string name
The name of the namespace.
Definition Types.hpp:100
std::string version
The version of the namespace.
Definition Types.hpp:101
std::vector< std::pair< std::string_view, std::string_view > > specVariables
The specVariables of the namespace.
Definition Types.hpp:110