return 8*sizeof(std::size_t);
}
+/*!
+ * If true is returned it is a LittleEndian machine.
+ * If false it is a BigEndian machine.
+ * \return the coding mode of integers of the machine.
+ */
+bool ParaMEDMEM::MEDCouplingByteOrder()
+{
+ unsigned int x(1);
+ unsigned char *xc(reinterpret_cast<unsigned char *>(&x));
+ return xc[0]==1;
+}
+
+const char *ParaMEDMEM::MEDCouplingByteOrderStr()
+{
+ static const char LITTLEENDIAN_STR[]="LittleEndian";
+ static const char BIGENDIAN_STR[]="BigEndian";
+ if(MEDCouplingByteOrder())
+ return LITTLEENDIAN_STR;
+ else
+ return BIGENDIAN_STR;
+}
+
RefCountObject::RefCountObject():_cnt(1)
{
}
MEDCOUPLING_EXPORT int MEDCouplingVersion();
MEDCOUPLING_EXPORT void MEDCouplingVersionMajMinRel(int& maj, int& minor, int& releas);
MEDCOUPLING_EXPORT int MEDCouplingSizeOfVoidStar();
+ MEDCOUPLING_EXPORT bool MEDCouplingByteOrder();
+ MEDCOUPLING_EXPORT const char *MEDCouplingByteOrderStr();
class MEDCOUPLING_EXPORT RefCountObject
{
const char *MEDCouplingVersionStr();
int MEDCouplingVersion();
int MEDCouplingSizeOfVoidStar();
+ bool MEDCouplingByteOrder();
+ const char *MEDCouplingByteOrderStr();
class RefCountObject
{