3 //=============================================================================
5 * @file be_identifier_helper.h
7 * Utilities associated with UTL_Identifier.
9 * @author Jeff Parsons <j.parsons@vanderbilt.edu>
11 //=============================================================================
14 #ifndef BE_IDENTIFIER_HELPER_H
15 #define BE_IDENTIFIER_HELPER_H
17 #include "utl_scoped_name.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "TAO_IDL_BE_Export.h"
24 #include "ace/SString.h"
31 * 1) keeps escape (leading underscore character in generated identifier in IDL
32 * 2) removes the '_' escape character when the identifier is
33 * part of another identifier such as in provides_XXX
34 * 3) removes any '_cxx_' in generated IDL
36 struct TAO_IDL_BE_Export IdentifierHelper
39 type_name (be_type
*t
, be_visitor
*visitor
);
42 original_local_name (Identifier
* local_name
);
44 // Removes '_cxx_ from segments of a scoped name, and optionally
45 // de-escape the last segment, if it's to be appended to.
47 orig_sn (UTL_ScopedName
* scoped_name
, bool for_idl
= true);
49 // Detects case-insensitive match with IDL keyword.
51 is_idl_keyword (Identifier
* local_name
);
53 // Preserves the 'escape' (leading underscore) in a
54 // generated identifier if necessary.
56 try_escape (Identifier
* local_name
);
58 static ACE_CString tmp_retval_
;
61 #endif /* BE_IDENTIFIER_HELPER_H */