-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <Selector_NameGenerator.h>
+#include <Locale_Convert.h>
+
#include <TNaming_NamedShape.hxx>
#include <TDataStd_Name.hxx>
return restoreBaseArray(anEmptyRefList, myFinal);
}
-TDF_Label Selector_Primitive::restoreByName(std::string theName,
+TDF_Label Selector_Primitive::restoreByName(std::wstring theName,
const TopAbs_ShapeEnum /*theShapeType*/, Selector_NameGenerator* theNameGenerator)
{
TDF_Label aContext;
return false;
}
-std::string Selector_Primitive::name(Selector_NameGenerator* theNameGenerator)
+std::wstring Selector_Primitive::name(Selector_NameGenerator* theNameGenerator)
{
Handle(TDataStd_Name) aName;
if (!myFinal.FindAttribute(TDataStd_Name::GetID(), aName))
- return "";
- std::string aResult = theNameGenerator->contextName(myFinal);
- if (!aResult.empty())
- aResult += "/" + std::string(TCollection_AsciiString(aName->Get()).ToCString());
+ return L"";
+ std::wstring aResult = theNameGenerator->contextName(myFinal);
+ if (!aResult.empty()) {
+ aResult += L"/";
+ aResult += Locale::Convert::toWString(aName->Get().ToExtString());
+ }
return aResult;
}