📄 readddlstream.cpp
字号:
/* Context : Fuzzy Clustering Algorithms Author : Frank Hoeppner, see also AUTHORS file Description : implementation of class module ReadDDLStream History : Comment : This file was generated automatically. DO NOT EDIT. Copyright : Copyright (C) 1999-2000 Frank Hoeppner This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*//* The University of Applied Sciences Oldenburg/Ostfriesland/Wilhelmshaven hereby disclaims all copyright interests in the program package `fc' (tool package for fuzzy cluster analysis) written by Frank Hoeppner. Prof. Haass, President of Vice, 2000-Mar-10*/#ifndef ReadDDLStream_SOURCE#define ReadDDLStream_SOURCE/* configuration include */#ifdef HAVE_CONFIG_H/*//FILETREE_IFDEF HAVE_CONFIG_H*/#include "config.h"/*//FILETREE_ENDIF*/#endif// necessary includes#include "ReadDDLStream.hpp"// data// implementationtemplate <class ANALYSIS>ReadDDLStream<ANALYSIS>::ReadDDLStream ( OnePassAlgorithm<ANALYSIS>* ap_alg, bool a_interactive ) : mp_succ_alg(ap_alg) , m_interactive(a_interactive) , m_analysis(&m_option,&m_data_set,&m_prot_set,&m_link_set) { }template <class ANALYSIS>ReadDDLStream<ANALYSIS>::~ReadDDLStream ( ) { FUNCLOG("~ReadDDLStream"); delete mp_succ_alg; }template <class ANALYSIS> voidReadDDLStream<ANALYSIS>::operator() ( istream& is ) { FUNCLOG("ReadDDLStream"); int analysis_counter(0); if (!m_interactive) read_until(is,KEYWORD_DDL); while ( (is_followed_by(is,KEYWORD_ANALYSIS)) &&( ((analysis_counter==0) && (m_interactive)) ||(!m_interactive) ) ) { ++analysis_counter; read_until(is,KEYWORD_ANALYSIS); { typename ANALYSIS::opt_type option; if (is_followed_by(is,KEYWORD_OPTIONS)) { is >> option; } (*mp_succ_alg)(m_analysis,option); } if (is_followed_by(is,KEYWORD_FEATURESET,false)) { while (!is_followed_by(is,KEYWORD_CLOSE,false)) { typename ANALYSIS::data_type datum; is >> datum; (*mp_succ_alg)(m_analysis,datum); } } else error("feature set is mandatory for analysis"); if (is_followed_by(is,KEYWORD_CLUSTERSET,false)) { while (!is_followed_by(is,KEYWORD_CLOSE,false)) { typename ANALYSIS::prot_type prototype; is >> prototype; (*mp_succ_alg)(m_analysis,prototype); } } if (is_followed_by(is,KEYWORD_LINKAGE,false)) { while (!is_followed_by(is,KEYWORD_CLOSE,false)) { typename ANALYSIS::link_type link; is >> link; (*mp_succ_alg)(m_analysis,link); } } if (!is_followed_by(is,KEYWORD_CLOSE,false)) SYNTAX_ERROR_EXPECTED("closing paranthesis of analysis"); (*mp_succ_alg)(m_analysis); } if (!m_interactive) { if (!is_followed_by(is,KEYWORD_CLOSE,false)) SYNTAX_ERROR_EXPECTED("closing paranthesis of ddl"); } }// template instantiation#endif // ReadDDLStream_SOURCE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -