00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef ACE_SVC_CONF_PARAM_H
00017 #define ACE_SVC_CONF_PARAM_H
00018
00019 #include "ace/pre.h"
00020
00021
00022
00023
00024 #include "ace/Obstack.h"
00025
00026 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00027 # pragma once
00028 #endif
00029
00030 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00031
00032
00033 struct ace_yy_buffer_state;
00034 class ACE_Service_Gestalt;
00035
00036 extern void ace_yy_delete_buffer (ace_yy_buffer_state *buffer);
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 class ACE_Svc_Conf_Param
00055 {
00056 public:
00057
00058 enum SVC_CONF_PARAM_TYPE
00059 {
00060
00061 SVC_CONF_FILE,
00062
00063
00064 SVC_CONF_DIRECTIVE
00065 };
00066
00067
00068 ACE_Svc_Conf_Param (ACE_Service_Gestalt* config, FILE *file)
00069 : type (SVC_CONF_FILE),
00070 yyerrno (0),
00071 yylineno (1),
00072 buffer (0),
00073 obstack (),
00074 config (config)
00075 {
00076 source.file = file;
00077 }
00078
00079
00080 ACE_Svc_Conf_Param (ACE_Service_Gestalt* config, const ACE_TCHAR *directive)
00081 : type (SVC_CONF_DIRECTIVE),
00082 yyerrno (0),
00083 yylineno (1),
00084 buffer (0),
00085 obstack (),
00086 config (config)
00087 {
00088 source.directive = directive;
00089 }
00090
00091 ~ACE_Svc_Conf_Param (void)
00092 {
00093 ace_yy_delete_buffer (this->buffer);
00094 }
00095
00096 public:
00097
00098 union
00099 {
00100
00101 FILE *file;
00102
00103
00104 const ACE_TCHAR *directive;
00105
00106 } source;
00107
00108
00109 SVC_CONF_PARAM_TYPE type;
00110
00111
00112 int yyerrno;
00113
00114
00115 int yylineno;
00116
00117
00118
00119 ace_yy_buffer_state *buffer;
00120
00121
00122
00123 ACE_Obstack_T<ACE_TCHAR> obstack;
00124
00125
00126 ACE_Service_Gestalt *config;
00127 };
00128
00129
00130
00131
00132 #define YYPARSE_PARAM ace_svc_conf_parameter
00133
00134 #define YYLEX_PARAM YYPARSE_PARAM
00135
00136 #define ACE_SVC_CONF_PARAM (static_cast<ACE_Svc_Conf_Param *> (YYLEX_PARAM))
00137
00138 ACE_END_VERSIONED_NAMESPACE_DECL
00139
00140 #include "ace/post.h"
00141
00142 #endif