Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

ModuleDef.cc

Go to the documentation of this file.
00001 //                            Package   : omniIFR
00002 //  ModuleDef.cc              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 #include "ModuleDef.h"
00024 
00025 #include "TypedefDef.h" // for CASE_TYPEDEF macro
00026 
00027 namespace Omniifr {
00028 
00029 void ModuleDef_impl::uncheckedDestroy()
00030 {
00031   Contained_impl::uncheckedDestroy();
00032   Container_impl::uncheckedDestroy();
00033 }
00034 
00035 Contained::Description* ModuleDef_impl::describe()
00036 {
00037   ModuleDescription_var moduledesc =new ModuleDescription();
00038   moduledesc->name       = name();
00039   moduledesc->id         = id();
00040   moduledesc->version    = version();
00041   moduledesc->defined_in = definedInId();
00042 
00043   CORBA::Contained::Description_var description =
00044     new CORBA::Contained::Description();
00045   description->kind  =   def_kind();
00046   description->value <<= moduledesc._retn();
00047 
00048   return description._retn();
00049 }
00050 
00051 bool ModuleDef_impl::canContain(DefinitionKind kind)
00052 {
00053   switch(kind)
00054   {
00055     CASE_TYPEDEF
00056     case dk_Constant:
00057     case dk_Exception:
00058     case dk_Interface:
00059     case dk_Value:
00060     case dk_ValueBox:
00061     case dk_Module:
00062       return true;
00063     default:
00064       return false;
00065   }
00066 }
00067 
00068 void ModuleDef_impl::output(ostream &os)
00069 {
00070   outputSelf(os,"ModuleDef");
00071   os<<" ;;\n";
00072   outputContents(os);
00073 }
00074 
00075 } // end namespace Omniifr

Generated on Fri Mar 4 13:03:23 2005 for OmniIFR by  doxygen 1.4.1