13 template<
typename T,
size_t N>
21 T&
at(
size_t pos ) {
FC_ASSERT( pos <
N,
"array out-of-bounds" );
return data[pos]; }
22 const T&
at(
size_t pos )
const {
FC_ASSERT( pos <
N,
"array out-of-bounds" );
return data[pos]; }
29 const T*
begin()
const {
return &data[0]; }
30 const T*
end()
const {
return &data[
N]; }
35 size_t size()
const {
return N; }
45 typedef unsigned char T;
52 T&
at(
size_t pos ) {
FC_ASSERT( pos <
N,
"array out-of-bounds" );
return data[pos]; }
53 const T&
at(
size_t pos )
const {
FC_ASSERT( pos <
N,
"array out-of-bounds" );
return data[pos]; }
57 const T*
begin()
const {
return &data[0]; }
58 const T*
end()
const {
return &data[
N]; }
60 size_t size()
const {
return N; }
77 T&
at(
size_t pos ) {
FC_ASSERT( pos <
N,
"array out-of-bounds" );
return data[pos]; }
78 const T&
at(
size_t pos )
const {
FC_ASSERT( pos <
N,
"array out-of-bounds" );
return data[pos]; }
82 const T*
begin()
const {
return &data[0]; }
83 const T*
end()
const {
return &data[
N]; }
85 size_t size()
const {
return N; }
90 template<
typename T,
size_t N>
92 {
return 0 == memcmp(
a.data, b.data,
N*
sizeof(
T) ); }
93 template<
typename T,
size_t N>
95 {
return memcmp(
a.data, b.data,
N*
sizeof(
T) ) < 0 ; }
97 template<
typename T,
size_t N>
99 {
return memcmp(
a.data, b.data,
N*
sizeof(
T) ) > 0 ; }
101 template<
typename T,
size_t N>
103 {
return 0 != memcmp(
a.data, b.data,
N*
sizeof(
T) ); }
105 template<
typename T,
size_t N>
108 v = std::vector<char>( (
const char*)&bi, ((
const char*)&bi) +
sizeof(bi) );
110 template<
typename T,
size_t N>
113 std::vector<char> ve = v.
as< std::vector<char> >();
119 memset( &bi,
char(0),
sizeof(bi) );
128 return _name.c_str();
133#include <unordered_map>
137 template<
typename T,
size_t N>
138 struct hash<
fc::array<T,N> >
const T & at(size_t pos) const
const T & at(size_t pos) const
const T & at(size_t pos) const
const T & operator[](size_t pos) const
T & operator[](size_t pos)
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Defines exception's used by fc.
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
bool operator<(const array< T, N > &a, const array< T, N > &b)
bool operator>(const array< T, N > &a, const array< T, N > &b)
fc::string to_string(double)
bool operator!=(const array< T, N > &a, const array< T, N > &b)
bool operator==(const array< T, N > &a, const array< T, N > &b)
size_t city_hash_size_t(const char *buf, size_t len)
const T & min(const T &a, const T &b)
void from_variant(const fc::variant &v, sysio::chain::chain_id_type &cid)
void to_variant(const sysio::chain::shared_public_key &var, fc::variant &vo)
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
#define T(meth, val, expected)
static const char * name()
size_t operator()(const fc::array< T, N > &e) const
memset(pInfo->slotDescription, ' ', 64)
memcpy((char *) pInfo->slotDescription, s, l)