X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMCType.hxx;h=94f32bdd140802cd238bd9b99a4f76cf9d470ff5;hb=009cf624f2bb7a09c1031af917bb9086fe520853;hp=17d7bef26fd0f04dbfaf60304436e990cf806596;hpb=4e3de127a60f9ffb63abae1d17ed01f3f6711fd2;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MCType.hxx b/src/MEDCoupling/MCType.hxx index 17d7bef26..94f32bdd1 100644 --- a/src/MEDCoupling/MCType.hxx +++ b/src/MEDCoupling/MCType.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2017-2019 CEA/DEN, EDF R&D +// Copyright (C) 2017-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -18,27 +18,38 @@ // // Author : Anthony Geay (EDF R&D) -#ifndef __MEDCOUPLING_MCTYPE_HXX__ -#define __MEDCOUPLING_MCTYPE_HXX__ +#pragma once + +#include "MCIdType.hxx" #include #include +#include namespace MEDCoupling { + using mcIdType = ::mcIdType; using Int64 = std::int64_t; using Int32 = std::int32_t; + + class DataArrayInt32; + class DataArrayInt32Iterator; + class DataArrayInt32Tuple; + class DataArrayInt64; + class DataArrayInt64Tuple; + #ifndef MEDCOUPLING_USE_64BIT_IDS - using mcIdType = std::int32_t; -#else - using mcIdType = std::int64_t; -#endif - inline mcIdType ToIdType(std::size_t val) { return mcIdType(val); } -} -#define DataArrayInt DataArrayInt32 #define DataArrayIdType DataArrayInt32 +#define DataArrayIdTypeTuple DataArrayInt32Tuple -#define DataArrayIntIterator DataArrayInt32Iterator +#else + +#define DataArrayIdType DataArrayInt64 +#define DataArrayIdTypeTuple DataArrayInt64Tuple #endif + +#define DataArrayInt DataArrayInt32 +#define DataArrayIntIterator DataArrayInt32Iterator +}