00001 #include "ace_pch.h" 00002 // -*- C++ -*- 00003 00004 #include "ace/Svc_Conf_Lexer_Guard.h" 00005 00006 #if (ACE_USES_CLASSIC_SVC_CONF == 1) 00007 00008 #include "ace/Svc_Conf.h" 00009 00010 ACE_RCSID (ace, 00011 Svc_Conf_Lexer_Guard, 00012 "$Id: Svc_Conf_Lexer_Guard.cpp,v 1.1.1.2.2.1 2003/03/13 19:44:22 chad Exp $") 00013 00014 ACE_Svc_Conf_Lexer_Guard::ACE_Svc_Conf_Lexer_Guard (ACE_Svc_Conf_Param *param) 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 } 00033 00034 ACE_Svc_Conf_Lexer_Guard::~ACE_Svc_Conf_Lexer_Guard (void) 00035 { 00036 // External synchronization is required. 00037 00038 ::ace_yy_pop_buffer (this->buffer_); 00039 } 00040 #endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */
1.2.14 written by Dimitri van Heesch,
© 1997-2002