#include <Svc_Conf_Lexer_Guard.h>
Public Methods | |
| ACE_Svc_Conf_Lexer_Guard (ACE_Svc_Conf_Param *param) | |
| Constructor. More... | |
| ~ACE_Svc_Conf_Lexer_Guard (void) | |
| Destructor. More... | |
Private Attributes | |
| ace_yy_buffer_state * | buffer_ |
| Lexer buffer that corresponds to the current Service Configurator file/direct scan. More... | |
Buffers are switched, if necessary, each time a token is parsed/scanned. The buffer switching must be synchronized externally. This class performs no synchronization.
Definition at line 45 of file Svc_Conf_Lexer_Guard.h.
|
|
Constructor. Switches buffers, if necessary, when token scanning first begins. Allocation of the buffer will also occur if one has not already been allocated. This operation effectively pushes a buffer on to a stack. Definition at line 14 of file Svc_Conf_Lexer_Guard.cpp. References ace_yy_push_buffer, buffer_, and ACE_Svc_Conf_Param::SVC_CONF_FILE.
00015 : buffer_ (0) 00016 { 00017 // External synchronization is required. 00018 00019 // Note that allocation/deallocation is done once during the 00020 // processing of a service configurator directive. Memory 00021 // managements is done at a higher level, not in this class. This 00022 // is necessary to prevent an allocation/deallocation from occurring 00023 // when parsing/scanning each token. 00024 00025 if (param->type == ACE_Svc_Conf_Param::SVC_CONF_FILE) 00026 ::ace_yy_push_buffer (param->source.file, param->buffer); 00027 00028 else ::ace_yy_push_buffer (param->source.directive, 00029 param->buffer); 00030 00031 this->buffer_ = param->buffer; 00032 } |
|
|
Destructor. Switches buffers, if necessary when token scanning completes. No buffer deallocation occurs here. Buffers are deallocated when parsing of the entire directive is done, not when scanning of a single token is done. This operation effective pops a buffer off of a stack. Definition at line 34 of file Svc_Conf_Lexer_Guard.cpp. References buffer_.
00035 {
00036 // External synchronization is required.
00037
00038 ::ace_yy_pop_buffer (this->buffer_);
00039 }
|
|
|
Lexer buffer that corresponds to the current Service Configurator file/direct scan.
Definition at line 72 of file Svc_Conf_Lexer_Guard.h. Referenced by ACE_Svc_Conf_Lexer_Guard, and ~ACE_Svc_Conf_Lexer_Guard. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002