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

SequenceDef.cc

Go to the documentation of this file.
00001 //                            Package   : omniIFR
00002 //  SequenceDef.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 "SequenceDef.h"
00024 #include "Repository.h"
00025 #include "PersistNode.h"
00026 #include "string_to.h"
00027 
00028 namespace Omniifr {
00029 
00030 TypeCode_ptr SequenceDef_impl::element_type()
00031 {
00032   return _element_type_def.in()->type();
00033 }
00034 
00035 IDLType_ptr SequenceDef_impl::element_type_def()
00036 {
00037   return _element_type_def.copy();
00038 }
00039 
00040 void SequenceDef_impl::element_type_def(IDLType_ptr v)
00041 {
00042   checkReadonly();
00043   _element_type_def.assign(CORBA::IDLType::_duplicate(v));
00044 }
00045 
00046 TypeCode_ptr SequenceDef_impl::type()
00047 {
00048   TypeCode_var tc=element_type();
00049   return Repository_impl::inst()._orb->create_sequence_tc(_bound,tc);
00050 }
00051 
00052 SequenceDef_impl::SequenceDef_impl(ULong bound)
00053 : _bound(bound),
00054   _element_type_def(this)
00055 {
00056   Repository_impl::inst().addAnonymous(this);
00057 }
00058 
00059 void SequenceDef_impl::uncheckedDestroy()
00060 {
00061   Repository_impl::inst().removeAnonymous(this);
00062   _element_type_def.clear();
00063 }
00064 
00065 
00066 void SequenceDef_impl::reincarnate(const PersistNode& node)
00067 {
00068   _element_type_def.assign(
00069     string_to_<CORBA::IDLType>(node.attrString("element_type_def").c_str())
00070   );
00071 }
00072 
00073 void SequenceDef_impl::output(ostream &os)
00074 {
00075   os<<"SequenceDef"<<PersistNode::_separator;
00076   outputOid(os);
00077   os<<"\n bound="<<_bound;
00078   PersistNode::outputIOR(os,_element_type_def.in(),"\n element_type_def=");
00079   os<<" ;;\n";
00080 }
00081 
00082 } // end namespace Omniifr

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