GUI/node_modules/slice2js/ice/cpp/src/Slice/JavaUtil.cpp
string
Slice::JavaCompatGenerator::fixKwd(const string& name) const
{
    if(name.empty())
    {
        return name;
    }
    if(name[0] != ':')
    {
        return lookupKwd(name);
    }
    StringList ids = splitScopedName(name);
#ifdef ICE_CPP11_COMPILER
    transform(ids.begin(), ids.end(), ids.begin(), [](const string& id) -> string { return lookupKwd(id); });
#else
    transform(ids.begin(), ids.end(), ids.begin(), ptr_fun(lookupKwd));
#endif
    stringstream result;
    for(StringList::const_iterator i = ids.begin(); i != ids.end(); ++i)
    {
        result << "::" + *i;
    }
    return result.str();
}
//
// If the passed name is a scoped name, return the identical scoped name,
// but with all components that are Java keywords replaced by
// their "_"-prefixed version; otherwise, if the passed name is
// not scoped, but a Java keyword, return the "_"-prefixed name;
// otherwise, return the name unchanged.
//
If the passed name is a scoped name, return the identical scoped name,
but with all components that are Java keywords replaced by
their "_"-prefixed version; otherwise, if the passed name is
not scoped, but a Java keyword, return the "_"-prefixed name;
otherwise, return the name unchanged.
If the passed name is a scoped name return the identical scoped name but with all components that are Java keywords replaced by their " _ " - prefixed version ; otherwise if the passed name is not scoped but a Java keyword return the " _ " - prefixed name ; otherwise return the name unchanged .
string
Slice::JavaCompatGenerator::fixKwd(const string& name) const
{
    if(name.empty())
    {
        return name;
    }
    if(name[0] != ':')
    {
        return lookupKwd(name);
    }
    StringList ids = splitScopedName(name);
#ifdef ICE_CPP11_COMPILER
    transform(ids.begin(), ids.end(), ids.begin(), [](const string& id) -> string { return lookupKwd(id); });
#else
    transform(ids.begin(), ids.end(), ids.begin(), ptr_fun(lookupKwd));
#endif
    stringstream result;
    for(StringList::const_iterator i = ids.begin(); i != ids.end(); ++i)
    {
        result << "::" + *i;
    }
    return result.str();
}
string Slice :: JavaCompatGenerator :: fixKwd ( const string & name ) const { if ( name . empty ( ) ) { return name ; } if ( name [ 0 ] != ' ' ) { return lookupKwd ( name ) ; } StringList ids = splitScopedName ( name ) ; #ifdef ICE_CPP11_COMPILER transform ( ids . begin ( ) , ids . end ( ) , ids . begin ( ) , [ ] ( const string & id ) -> string { return lookupKwd ( id ) ; } ) ; #else transform ( ids . begin ( ) , ids . end ( ) , ids . begin ( ) , ptr_fun ( lookupKwd ) ) ; #endif stringstream result ; for ( StringList :: const_iterator i = ids . begin ( ) ; i != ids . end ( ) ; ++ i ) { result << " " + * i ; } return result . str ( ) ; }
If the passed name is a scoped name, return the identical scoped name,
but with all components that are Java keywords replaced by
their "_"-prefixed version; otherwise, if the passed name is
not scoped, but a Java keyword, return the "_"-prefixed name;
otherwise, return the name unchanged.
If the passed name is a scoped name return the identical scoped name but with all components that are Java keywords replaced by their " _ " - prefixed version ; otherwise if the passed name is not scoped but a Java keyword return the " _ " - prefixed name ; otherwise return the name unchanged .