00001 // Package : omniIFR 00002 // OperationDef.h Created : 2004/02/22 00003 // Author : Alex Tingle 00004 // 00005 // Copyright (C) 2004 Alex Tingle. 00006 // 00007 // This file is part of the omniIFR application. 00008 // 00009 // omniIFR is free software; you can redistribute it and/or 00010 // modify it under the terms of the GNU Lesser General Public 00011 // License as published by the Free Software Foundation; either 00012 // version 2.1 of the License, or (at your option) any later version. 00013 // 00014 // omniIFR is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 // Lesser General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU Lesser General Public 00020 // License along with this library; if not, write to the Free Software 00021 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 // 00023 #ifndef OMNIIFR__OPERATIONDEF_H 00024 #define OMNIIFR__OPERATIONDEF_H 00025 00026 #include "Contained.h" 00027 #include "Dependency.h" 00028 00029 namespace Omniifr { 00030 00031 class IDLType_impl; 00032 class Container_impl; 00033 class Repository_impl; 00034 00035 class OperationDef_impl : 00036 public virtual POA_CORBA::OperationDef, 00037 public Contained_impl 00038 { 00039 public: // CORBA attributes 00040 TypeCode_ptr result(); 00041 IDLType_ptr result_def(); 00042 void result_def(IDLType_ptr v); 00043 ParDescriptionSeq* params(); 00044 void params(const ParDescriptionSeq& v); 00045 OperationMode mode(); 00046 void mode(OperationMode v); 00047 ContextIdSeq* contexts(); 00048 void contexts(const ContextIdSeq& v); 00049 ExceptionDefSeq* exceptions(); 00050 void exceptions(const ExceptionDefSeq& v); 00051 public: // CORBA interface methods (from IRObject) 00052 DefinitionKind def_kind(){return CORBA::dk_Operation;} 00053 public: // CORBA interface methods (from Contained) 00054 CORBA::Contained::Description* describe(); 00055 00056 private: 00057 TypeCode_var _result; 00058 Dependency1<IDLType> _result_def; 00059 Dependency3<ParDescriptionSeq> _params; 00060 OperationMode _mode; 00061 ContextIdSeq _contexts; 00062 Dependency2<ExceptionDefSeq> _exceptions; 00063 ExcDescriptionSeq _excDescriptionSeq; 00064 00065 public: 00066 OperationDef_impl(): 00067 _result(), 00068 _result_def(this), 00069 _params(this), 00070 _mode(CORBA::OP_NORMAL), 00071 _contexts(), 00072 _exceptions(this), 00073 _excDescriptionSeq() 00074 {} 00075 virtual ~OperationDef_impl() {} 00076 void uncheckedDestroy(); 00077 void reincarnate(const PersistNode& node); 00078 void output(ostream &os); 00079 00080 private: 00084 void checkOneway( 00085 const OperationMode mode, 00086 const ParDescriptionSeq& params, 00087 IDLType_ptr result_def 00088 ) const; 00089 }; 00090 00091 } // end namespace Omniifr 00092 00093 #endif // OMNIIFR__OPERATIONDEF_H