Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

InterfaceMethod.h

Go to the documentation of this file.
00001 // /******************************************************************************\
00002 // *
00003 // * File:          InterfaceMethod.h
00004 // * Creation date: May 17, 2001 11:37
00005 // * Author:        ClassBuilder
00006 // *                XXXX
00007 // * Purpose:       Declaration of class 'SCInterfaceMethod'
00008 // *
00009 // * Modifications: @INSERT_MODIFICATIONS(* )
00010 // * June 19, 2001 16:42 WERS
00011 // *     Added member 'm_convInfo'
00012 // *     Added member 'm_convId'
00013 // * May 25, 2001 11:41 WERS
00014 // *     Updated interface of method 'SCInterfaceMethod'
00015 // * May 25, 2001 11:34 WERS
00016 // *     Added relation 'InterfaceRepository(SCInterfaceRepository) <>-->> InterfaceMethod(SCInterfaceMethod)'
00017 // *     Updated interface of method 'ConstructorInclude'
00018 // *     Updated interface of method 'SCInterfaceMethod'
00019 // * May 18, 2001 10:41 WERS
00020 // *     Updated interface of method 'SCInterfaceMethod'
00021 // *     Updated relation 'InterfaceMethod(SCInterfaceMethod) <>-->> MethParam(SCMethParam)'
00022 // *     Updated member 'm_mthPath'
00023 // *     Updated member 'm_mthId'
00024 // * May 17, 2001 11:37 WERS
00025 // *     Added method 'DestructorInclude'
00026 // *     Added method 'ConstructorInclude'
00027 // *     Added method '~SCInterfaceMethod'
00028 // *     Added method 'SCInterfaceMethod'
00029 // *     Added relation 'InterfaceMethod(SCInterfaceMethod) <>-->> MethParam(SCMethParam)'
00030 // *     Added member 'm_mthPath'
00031 // *     Added member 'm_mthId'
00032 // *
00033 // *
00034 // \******************************************************************************/
00035 #ifndef _INTERFACEMETHOD_H
00036 #define _INTERFACEMETHOD_H
00037 
00038 //@START_USER1
00043 /* --------------------------------------------------------------
00044 Copyright (C) 2001 LifeLine Networks BV <soap2corba@lifeline.nl>
00045 
00046 This program is free software; you can redistribute it and/or
00047 modify it under the terms of the GNU General Public License
00048 as published by the Free Software Foundation; either
00049 version 2 of the License, or (at your option) any later
00050 version.
00051 
00052 This program is distributed in the hope that it will be useful,
00053 but WITHOUT ANY WARRANTY; without even the implied warranty of
00054 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00055 GNU General Public License for more details.
00056 
00057 You should have received a copy of the GNU General Public License
00058 along with this program; if not, write to the Free Software
00059 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00060 -------------------------------------------------------------- */
00061 //@END_USER1
00062 
00063 
00067 class SCInterfaceMethod
00068 {
00069     // RELATION_MULTI_OWNED_ACTIVE(SCInterfaceMethod, InterfaceMethod, SCMethParam, MethParam)
00070 public:
00071     SCMethParam * _firstMethParam;
00072     SCMethParam * _lastMethParam;
00073     int _countMethParam;
00074 
00075 protected:
00076     void AddMethParamFirst(SCMethParam* item);
00077     void AddMethParamLast(SCMethParam* item);
00078     void AddMethParamAfter(SCMethParam* item, SCMethParam* pos);
00079     void AddMethParamBefore(SCMethParam* item, SCMethParam* pos);
00080     void RemoveMethParam(SCMethParam* item);
00081     void ReplaceMethParam(SCMethParam* item, SCMethParam* newItem);
00082 
00083 public:
00084     void DeleteAllMethParam();
00085     SCMethParam* GetFirstMethParam() const;
00086     SCMethParam* GetLastMethParam() const;
00087     SCMethParam* GetNextMethParam(SCMethParam* pos) const;
00088     SCMethParam* GetPrevMethParam(SCMethParam* pos) const;
00089     int GetMethParamCount() const;
00090     void MoveMethParamFirst(SCMethParam* item);
00091     void MoveMethParamLast(SCMethParam* item);
00092     void MoveMethParamAfter(SCMethParam* item, SCMethParam* pos);
00093     void MoveMethParamBefore(SCMethParam* item, SCMethParam* pos);
00094     void SortMethParam(int (*comp)(SCMethParam*, SCMethParam*));
00095     
00096     class  MethParamIterator
00097     {
00098     private:
00099         SCMethParam* _refMethParam;
00100         SCMethParam* _prevMethParam;
00101         SCMethParam* _nextMethParam;
00102         const SCInterfaceMethod* _iterInterfaceMethod;
00103         
00104         MethParamIterator* _prev;
00105         MethParamIterator* _next;
00106         
00107         int (SCMethParam::*_method)() const;
00108         
00109         static MethParamIterator* _first;
00110         static MethParamIterator* _last;
00111         
00112     public:
00113         MethParamIterator(const SCInterfaceMethod* iterInterfaceMethod,
00114                          int (SCMethParam::*method)() const = 0,
00115                          SCMethParam* refMethParam = 0);
00116         MethParamIterator(const SCInterfaceMethod& iterInterfaceMethod,
00117                          int (SCMethParam::*method)() const = 0,
00118                          SCMethParam* refMethParam = 0);
00119         MethParamIterator(const MethParamIterator& iterator,
00120                          int (SCMethParam::*method)() const = 0);
00121         ~MethParamIterator();
00122         
00123         MethParamIterator& operator= (const MethParamIterator& iterator)
00124         {
00125             _iterInterfaceMethod = iterator._iterInterfaceMethod;
00126             _refMethParam = iterator._refMethParam;
00127             _prevMethParam = iterator._prevMethParam;
00128             _nextMethParam = iterator._nextMethParam;
00129             _method = iterator._method;
00130             return *this;
00131         }
00132         SCMethParam* operator++ ()
00133         {
00134             _nextMethParam = _iterInterfaceMethod->GetNextMethParam(_nextMethParam);
00135             if (_method != 0)
00136             {
00137                 while (_nextMethParam && !(_nextMethParam->*_method)())
00138                     _nextMethParam = _iterInterfaceMethod->GetNextMethParam(_nextMethParam);
00139             }
00140             _refMethParam = _prevMethParam = _nextMethParam;
00141             return _refMethParam;
00142         }
00143         SCMethParam* operator-- ()
00144         {
00145             _prevMethParam = _iterInterfaceMethod->GetPrevMethParam(_prevMethParam);
00146             if (_method != 0)
00147             {
00148                 while (_prevMethParam && !(_prevMethParam->*_method)())
00149                     _prevMethParam = _iterInterfaceMethod->GetPrevMethParam(_prevMethParam);
00150             }
00151             _refMethParam = _nextMethParam = _prevMethParam;
00152             return _refMethParam;
00153         }
00154         operator SCMethParam*() { return _refMethParam; }
00155         SCMethParam* operator-> () { return _refMethParam; }
00156         SCMethParam* Get() { return _refMethParam; }
00157         void Reset() { _refMethParam = _prevMethParam = _nextMethParam = (SCMethParam*)0; }
00158         
00159         int IsLast() { return (_iterInterfaceMethod->GetLastMethParam() == _refMethParam); }
00160         int IsFirst() { return (_iterInterfaceMethod->GetFirstMethParam() == _refMethParam); }
00161         
00162         static void Check(SCMethParam* itemMethParam);
00163         static void Check(SCMethParam* itemMethParam, SCMethParam* newItemMethParam);
00164     };
00165     // RELATION_MULTI_OWNED_PASSIVE(SCInterfaceRepository, InterfaceRepository, SCInterfaceMethod, InterfaceMethod)
00166     
00167 public:
00168     SCInterfaceRepository * _refInterfaceRepository;
00169     SCInterfaceMethod * _prevInterfaceRepository;
00170     SCInterfaceMethod * _nextInterfaceRepository;
00171 
00172 public:
00173     SCInterfaceRepository* GetInterfaceRepository() const { return _refInterfaceRepository; };
00174 
00175 //@START_USER2
00176 //@END_USER2
00177 
00178 // Members
00179 private:
00180 
00181 protected:
00182 
00183 public:
00184     int m_mthId;
00185     CString m_mthPath;
00186     int m_convId;
00187     CString m_convInfo;
00188 
00189 // Methods
00190 private:
00191     void ConstructorInclude(SCInterfaceRepository* pInterfaceRepository);
00192     void DestructorInclude();
00193 
00194 protected:
00195 
00196 public:
00197     SCInterfaceMethod(SCInterfaceRepository* pInterfaceRepository, int mthId,
00198                       const char* mthPath);
00199     virtual ~SCInterfaceMethod();
00200 };
00201 
00202 #endif
00203 
00204 
00205 #ifdef CB_INLINES
00206 #ifndef _INTERFACEMETHOD_H_INLINES
00207 #define _INTERFACEMETHOD_H_INLINES
00208 
00209 //@START_USER3
00210 //@END_USER3
00211 
00212 #endif
00213 #endif
00214 

This documentation is part of the "SOAP to CORBA bridge" project
Copyright © 2000 by Lifeline Networks bv.
All rights are reserved.