20 #ifndef PRIMITIVE_TRAITS_H 21 #define PRIMITIVE_TRAITS_H 23 #ifndef SHEAF_DLL_SPEC_H 24 #include "SheafSystem/sheaf_dll_spec.h" 28 #include "SheafSystem/std_cstring.h" 31 #ifndef PRIMITIVE_TYPE_H 32 #include "SheafSystem/primitive_type.h" 68 static std::string name();
73 static std::string aliases();
78 static std::string hdf_type_name();
83 static int hdf_type();
88 static T default_value();
113 struct alignment_type
118 return offsetof(alignment_type, prim);
120 static const std::string& name()
122 static const std::string result(
"BOOL");
125 static const std::string& aliases()
127 static const std::string result;
130 static const std::string& hdf_type_name()
132 static const std::string result(
"SHF_PRIMITIVE_BOOL");
135 static int hdf_type();
136 static bool default_value()
157 struct alignment_type
162 return offsetof(alignment_type, prim);
164 static const std::string& name()
166 static const std::string result(
"CHAR");
169 static const std::string& aliases()
171 static const std::string result;
174 static const std::string& hdf_type_name()
176 static const std::string result(
"SHF_PRIMITIVE_CHAR");
179 static int hdf_type();
180 static char default_value()
189 typedef signed char type;
196 return sizeof(
signed char);
200 struct alignment_type
205 return offsetof(alignment_type, prim);
207 static const std::string& name()
209 static const std::string result(
"SIGNED_CHAR");
212 static const std::string& aliases()
214 static const std::string result;
217 static const std::string& hdf_type_name()
219 static const std::string result(
"SHF_PRIMITIVE_SIGNED_CHAR");
222 static int hdf_type();
223 static signed char default_value()
232 typedef short int type;
239 return sizeof(
short int);
243 struct alignment_type
248 return offsetof(alignment_type, prim);
250 static const std::string& name()
252 static const std::string result(
"SHORT_INT");
255 static const std::string& aliases()
257 static const std::string result;
260 static const std::string& hdf_type_name()
262 static const std::string result(
"SHF_PRIMITIVE_SHORT_INT");
265 static int hdf_type();
266 static short int default_value()
286 struct alignment_type
291 return offsetof(alignment_type, prim);
293 static const std::string& name()
295 static const std::string result(
"INT");
298 static const std::string& aliases()
300 static const std::string result(
"INT_TYPE POD_INDEX_TYPE");
303 static const std::string& hdf_type_name()
305 static const std::string result(
"SHF_PRIMITIVE_INT");
308 static int hdf_type();
309 static int default_value()
318 typedef long int type;
325 return sizeof(
long int);
329 struct alignment_type
334 return offsetof(alignment_type, prim);
336 static const std::string& name()
338 static const std::string result(
"LONG_INT");
341 static const std::string& aliases()
343 static const std::string result;
346 static const std::string& hdf_type_name()
348 static const std::string result(
"SHF_PRIMITIVE_LONG_INT");
351 static int hdf_type();
352 static long int default_value()
361 typedef long long int type;
364 return LONG_LONG_INT;
368 return sizeof(
long long int);
372 struct alignment_type
377 return offsetof(alignment_type, prim);
379 static const std::string& name()
381 static const std::string result(
"LONG_LONG_INT");
384 static const std::string& aliases()
386 static const std::string result;
389 static const std::string& hdf_type_name()
391 static const std::string result(
"SHF_PRIMITIVE_LONG_LONG_INT");
394 static int hdf_type();
395 static long long int default_value()
404 typedef unsigned char type;
407 return UNSIGNED_CHAR;
411 return sizeof(
unsigned char);
415 struct alignment_type
420 return offsetof(alignment_type, prim);
422 static const std::string& name()
424 static const std::string result(
"UNSIGNED_CHAR");
427 static const std::string& aliases()
429 static const std::string result;
432 static const std::string& hdf_type_name()
434 static const std::string result(
"SHF_PRIMITIVE_UNSIGNED_CHAR");
437 static int hdf_type();
438 static unsigned char default_value()
447 typedef short int type;
450 return UNSIGNED_SHORT_INT;
454 return sizeof(
unsigned short int);
458 struct alignment_type
461 unsigned short int prim;
463 return offsetof(alignment_type, prim);
465 static const std::string& name()
467 static const std::string result(
"UNSIGNED_SHORT_INT");
470 static const std::string& aliases()
472 static const std::string result;
475 static const std::string& hdf_type_name()
477 static const std::string result(
"SHF_PRIMITIVE_UNSIGNED_SHORT_INT");
480 static int hdf_type();
481 static unsigned short int default_value()
497 return sizeof(
unsigned int);
501 struct alignment_type
506 return offsetof(alignment_type, prim);
508 static const std::string& name()
510 static const std::string result(
"UNSIGNED_INT");
513 static const std::string& aliases()
515 static const std::string result;
518 static const std::string& hdf_type_name()
520 static const std::string result(
"SHF_PRIMITIVE_UNSIGNED_INT");
523 static int hdf_type();
524 static unsigned int default_value()
533 typedef long int type;
536 return UNSIGNED_LONG_INT;
540 return sizeof(
unsigned long int);
544 struct alignment_type
547 unsigned long int prim;
549 return offsetof(alignment_type, prim);
551 static const std::string& name()
553 static const std::string result(
"UNSIGNED_LONG_INT");
556 static const std::string& aliases()
558 static const std::string result(
"SIZE_TYPE");
561 static const std::string& hdf_type_name()
563 static const std::string result(
"SHF_PRIMITIVE_UNSIGNED_LONG_INT");
566 static int hdf_type();
567 static unsigned long int default_value()
576 typedef long long int type;
579 return UNSIGNED_LONG_LONG_INT;
583 return sizeof(
unsigned long long int);
587 struct alignment_type
590 unsigned long long int prim;
592 return offsetof(alignment_type, prim);
594 static const std::string& name()
596 static const std::string result(
"UNSIGNED_LONG_LONG_INT");
599 static const std::string& aliases()
601 static const std::string result;
604 static const std::string& hdf_type_name()
606 static const std::string result(
"SHF_PRIMITIVE_UNSIGNED_LONG_LONG_INT");
609 static int hdf_type();
610 static unsigned long long int default_value()
626 return sizeof(float);
630 struct alignment_type
635 return offsetof(alignment_type, prim);
637 static const std::string& name()
639 static const std::string result(
"FLOAT");
642 static const std::string& aliases()
644 static const std::string result;
647 static const std::string& hdf_type_name()
649 static const std::string result(
"SHF_PRIMITIVE_FLOAT");
652 static int hdf_type();
653 static float default_value()
669 return sizeof(double);
673 struct alignment_type
678 return offsetof(alignment_type, prim);
680 static const std::string& name()
682 static const std::string result(
"DOUBLE");
685 static const std::string& aliases()
687 static const std::string result;
690 static const std::string& hdf_type_name()
692 static const std::string result(
"SHF_PRIMITIVE_DOUBLE");
695 static int hdf_type();
696 static double default_value()
705 typedef long double type;
712 return sizeof(
long double);
716 struct alignment_type
721 return offsetof(alignment_type, prim);
723 static const std::string& name()
725 static const std::string result(
"LONG_DOUBLE");
728 static const std::string& aliases()
730 static const std::string result;
733 static const std::string& hdf_type_name()
735 static const std::string result(
"SHF_PRIMITIVE_LONG_DOUBLE");
738 static int hdf_type();
739 static long double default_value()
759 struct alignment_type
764 return offsetof(alignment_type, prim);
766 static const std::string& name()
768 static const std::string result(
"VOID_STAR");
771 static const std::string& aliases()
773 static const std::string result;
776 static const std::string& hdf_type_name()
778 static const std::string result(
"SHF_PRIMITIVE_VOID_STAR");
781 static int hdf_type();
802 struct alignment_type
807 return offsetof(alignment_type, prim);
809 static const std::string& name()
811 static const std::string result(
"C_STRING");
814 static const std::string& aliases()
816 static const std::string result;
819 static const std::string& hdf_type_name()
821 static const std::string result(
"SHF_PRIMITIVE_C_STRING");
824 static int hdf_type();
834 typedef char const* type;
845 struct alignment_type
850 return offsetof(alignment_type, prim);
852 static const std::string& name()
854 static const std::string result(
"C_STRING");
857 static const std::string& aliases()
859 static const std::string result;
862 static const std::string& hdf_type_name()
864 static const std::string result(
"SHF_PRIMITIVE_C_STRING");
867 static int hdf_type();
868 static char const* default_value()
880 return NAMESPACE_RELATIVE_MEMBER_INDEX;
888 struct alignment_type
893 return offsetof(alignment_type, prim);
895 static const std::string& name()
897 static const std::string result(
"NAMESPACE_RELATIVE_MEMBER_INDEX");
900 static const std::string& aliases()
902 static const std::string result;
905 static const std::string& hdf_type_name()
907 static const std::string result(
"SHF_PRIMITIVE_NAMESPACE_RELATIVE_MEMBER_INDEX");
910 static int hdf_type();
923 return NAMESPACE_RELATIVE_SUBPOSET_INDEX;
931 struct alignment_type
936 return offsetof(alignment_type, prim);
938 static const std::string& name()
940 static const std::string result(
"NAMESPACE_RELATIVE_SUBPOSET_INDEX");
943 static const std::string& aliases()
945 static const std::string result;
948 static const std::string& hdf_type_name()
950 static const std::string result(
"SHF_PRIMITIVE_NAMESPACE_RELATIVE_SUBPOSET_INDEX");
953 static int hdf_type();
966 return NOT_A_PRIMITIVE_TYPE;
976 static const std::string& name()
978 static const std::string result(
"NOT_A_PRIMITIVE_TYPE");
981 static const std::string& aliases()
983 static const std::string result;
986 static const std::string& hdf_type_name()
988 static const std::string result;
991 static int hdf_type();
995 for(
int i=0; i<
sizeof(lbuf); ++i)
997 reinterpret_cast<char*
>(&lbuf)[i] = 0;
1010 #endif // ifndef PRIMITIVE_TRAITS_H
SHEAF_DLL_SPEC namespace_relative_member_index_pod_type invalid_namespace_relative_member_index_pod()
The invalid namespace_relative_member_index_pod_type value.
SHEAF_DLL_SPEC namespace_relative_subposet_index_pod_type invalid_namespace_relative_subposet_index_pod()
The invalid namespace_relative_subposet_index_pod_type value.
void * void_star
Synonym for void*.
primitive_type
Type ids for sheaf primitives.
Type of buffer large enough to hold any primitive type.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
POD type associated with namespace_relative_subposet_index.
POD type for namespace_relative_member_index.
Traits for primitive type T.
Namespace for the sheaves component of the sheaf system.
char * c_string
Synonym for char*.