A Channel contains several data Sections representing observations of the same physical quantity.
More...
#include <channel.h>
List of all members.
Public Member Functions |
| Channel (void) |
| Default constructor.
|
| Channel (const Section &c_Section) |
| Constructor.
|
| Channel (const std::vector< Section > &SectionList) |
| Constructor.
|
| Channel (std::size_t c_n_sections, std::size_t section_size=0) |
| Constructor.
|
| ~Channel () |
| Destructor.
|
Section & | operator[] (std::size_t at_) |
| Unchecked access to a section (read and write)
|
const Section & | operator[] (std::size_t at_) const |
| Unchecked access to a section (read-only)
|
const std::string & | GetChannelName () const |
| Retrieves the channel name.
|
const std::string & | GetYUnits () const |
| Retrieves the y units string.
|
size_t | size () const |
| Retrieves the size of the section array.
|
const Section & | at (std::size_t at_) const |
| Range-checked access to a section (read-only).
|
Section & | at (std::size_t at_) |
| Range-checked access to a section (read and write).
|
const std::vector< Section > & | get () const |
| Low-level access to the section array (read-only).
|
std::vector< Section > & | get () |
| Low-level access to the section array (read and write).
|
void | SetChannelName (const std::string &value) |
| Sets the channel name.
|
void | SetYUnits (const std::string &value) |
| Sets the y units string.
|
void | InsertSection (const Section &c_Section, std::size_t pos) |
| Inserts a section at the given position, overwriting anything that's currently stored at that position.
|
void | resize (std::size_t newSize) |
| Resize the section array.
|
void | reserve (std::size_t resSize) |
| Reserve memory for a number of sections.
|
Detailed Description
A Channel contains several data Sections representing observations of the same physical quantity.
Definition at line 31 of file channel.h.
Constructor & Destructor Documentation
Constructor.
- Parameters:
-
c_Section | A single section from which to construct the channel |
Constructor.
- Parameters:
-
SectionList | A vector of Sections from which to construct the channel |
Channel::Channel |
( |
std::size_t |
c_n_sections, |
|
|
std::size_t |
section_size = 0 |
|
) |
| [explicit] |
Constructor.
Setting the number of sections at construction time will avoid unnecessary memory re-allocations.
- Parameters:
-
c_n_sections | The number of sections. |
section_size | Initial section size. Will serve additional re-alocations if known at construction time. |
Member Function Documentation
Range-checked access to a section (read-only).
Will throw std::out_of_range if out of range.
- Parameters:
-
at_ | The index of the section. |
- Returns:
- The section at index at_.
Range-checked access to a section (read and write).
Will throw std::out_of_range if out of range.
- Parameters:
-
at_ | The index of the section. |
- Returns:
- The section at index at_.
Low-level access to the section array (read-only).
- Returns:
- The vector containing the sections.
Definition at line 110 of file channel.h.
Low-level access to the section array (read and write).
- Returns:
- The vector containing the sections.
Definition at line 116 of file channel.h.
Retrieves the channel name.
- Returns:
- The channel name.
Definition at line 81 of file channel.h.
Retrieves the y units string.
- Returns:
- The y units string.
Definition at line 86 of file channel.h.
Inserts a section at the given position, overwriting anything that's currently stored at that position.
Meant to be used after constructing with Channel(const unsigned int& c_n_sections}. The section array size has to be larger than pos because it won't be resized. Will throw std::out_of_range if out of range.
- Parameters:
-
c_Section | The section to be inserted. |
pos | The position at which to insert the section. |
Section& Channel::operator[] |
( |
std::size_t |
at_ | ) |
[inline] |
Unchecked access to a section (read and write)
Use at() for range-checked access.
- Parameters:
-
- Returns:
- The section at index at_.
Definition at line 67 of file channel.h.
const Section& Channel::operator[] |
( |
std::size_t |
at_ | ) |
const [inline] |
Unchecked access to a section (read-only)
Use at() for range-checked access.
- Parameters:
-
- Returns:
- The section at index at_.
Definition at line 74 of file channel.h.
Reserve memory for a number of sections.
This will avoid unnecessary memory re-allocations.
- Parameters:
-
resSize | The number of sections to reserve memory for. |
Resize the section array.
- Parameters:
-
newSize | The new number of sections. |
Sets the channel name.
- Parameters:
-
Definition at line 123 of file channel.h.
Sets the y units string.
- Parameters:
-
value | The new y units string. |
Definition at line 128 of file channel.h.
Retrieves the size of the section array.
- Returns:
- The size of the section array.
Definition at line 91 of file channel.h.
The documentation for this class was generated from the following file: