Use override/default for RTPortableServer
[ACE_TAO.git] / ACE / ace / Svc_Conf_Lexer.h
blobad2528ba44ad8a9919cd8cb58c9f9aacef63b55a
1 // -*- C++ -*-
3 //=========================================================================
4 /**
5 * @file Svc_Conf_Lexer.h
7 * This class is a hand-coded replacement for the lexer generated from
8 * Svc_Conf.l that correctly supports Unicode.
10 * @author Chad Elliott <elliott_c@ociweb.com>
12 //=========================================================================
14 #ifndef SVC_CONF_LEXER_H
15 #define SVC_CONF_LEXER_H
17 #include /**/ "ace/pre.h"
18 #include "ace/Svc_Conf.h"
20 #if (ACE_USES_CLASSIC_SVC_CONF == 1)
21 #include "ace/Encoding_Converter_Factory.h"
23 class ACE_Encoding_Converter;
25 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
27 /** This class lexes the classic ACE Service Configurator language.
28 * The entry point is similar to what flex would generate. However, it
29 * is a static method in this class (which is really just name space).
31 class ACE_Svc_Conf_Lexer
33 public:
34 /// This is similar to the C function, ace_yylex, which a bison
35 /// generated parser expects. It returns information in the ace_yylval
36 /// parameter and uses input stored in the param parameter.
37 static int yylex (YYSTYPE* ace_yylval,
38 ACE_Svc_Conf_Param* param);
40 private:
41 static size_t input(ACE_Svc_Conf_Param* param, char* buf, size_t max_size);
43 static int scan (YYSTYPE* ace_yylval, ACE_Svc_Conf_Param* param);
45 #if defined (ACE_USES_WCHAR)
46 static bool convert_to_utf8 (
47 ACE_Svc_Conf_Param* param,
48 size_t skip_bytes,
49 ACE_Encoding_Converter_Factory::Encoding_Hint hint);
50 static bool convert_from_utf8 (ACE_Encoding_Converter* converter,
51 const char* source,
52 size_t source_size,
53 ACE_TCHAR* target,
54 size_t target_size,
55 size_t& length);
56 static ACE_Encoding_Converter_Factory::Encoding_Hint
57 locate_bom (char* source,
58 size_t source_size,
59 size_t& bytes_used);
60 #endif /* ACE_USES_WCHAR */
63 ACE_END_VERSIONED_NAMESPACE_DECL
64 #endif /* ACE_USES_CLASSIC_SVC_CONF = 1 */
66 #include /**/ "ace/post.h"
68 #endif /* SVC_CONF_LEXER_H */