1#ifndef UTIL_CARRAY_PARAM_H
2#define UTIL_CARRAY_PARAM_H
4#include <util/param/ArrayParam.h>
102 template <
class Type>
104 { ar.
unpack(value_, n()); }
109 template <
class Type>
111 { ar.
pack(value_, n()); }
117 template <
class Type>
119 { bcast<Type>(ioCommunicator(), value_, n(), 0); }
This file contains templates for global functions send<T>, recv<T> and bcast<T>.
An array-valued parameter in a parameter file.
int n() const
Get the logical array dimension.
std::string label() const
Return label string.
void writeParam(std::ostream &out) const
Write an array-valued parameter to stream.
virtual void readValue(std::istream &in)
Read array of element values from an input stream.
bool isRequired() const
Is this an optional parameter?
Saving archive for binary istream.
void unpack(T &data)
Unpack a single T object.
Saving / output archive for binary ostream.
void pack(const T &data)
Pack one object of type T.
A Parameter associated with a 1D C array.
Type const & element(int i) const
Return a reference to one element of the array (const ref).
CArrayParam(const char *label, Type *value, int n, bool isRequired=true)
Constructor.
Type & element(int i)
Return a reference to one element of the array (non const).
virtual void saveValue(Serializable::OArchive &ar)
Save parameter value to an archive.
virtual void loadValue(Serializable::IArchive &ar)
Load bare parameter value from an archive.
virtual void bcastValue()
Broadcast parameter value within the ioCommunicator.
File containing preprocessor macros for error handling.
Utility classes for scientific computation.