00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include "AliasDef.h"
00024 #include "Repository.h"
00025 #include "PersistNode.h"
00026 #include "string_to.h"
00027
00028 namespace Omniifr {
00029
00030 IDLType_ptr AliasDef_impl::original_type_def()
00031 {
00032 return _original_type_def.copy();
00033 }
00034
00035 void AliasDef_impl::original_type_def(IDLType_ptr v)
00036 {
00037 checkReadonly();
00038 _original_type_def.assign(CORBA::IDLType::_duplicate(v));
00039 }
00040
00041 TypeCode_ptr AliasDef_impl::type()
00042 {
00043 TypeCode_var tc=_original_type_def.in()->type();
00044 return Repository_impl::inst()._orb
00045 ->create_alias_tc(_id.in(),_name.in(),tc.in());
00046 }
00047
00048 void AliasDef_impl::uncheckedDestroy()
00049 {
00050 _original_type_def.clear();
00051 Contained_impl::uncheckedDestroy();
00052 }
00053
00054 void AliasDef_impl::reincarnate(const PersistNode& node)
00055 {
00056 _original_type_def.assign(
00057 string_to_<CORBA::IDLType>(node.attrString("original_type_def").c_str())
00058 );
00059 }
00060
00061 void AliasDef_impl::output(ostream &os)
00062 {
00063 outputSelf(os,"AliasDef");
00064 PersistNode::outputIOR(os,_original_type_def.in(),"\n original_type_def=");
00065 os<<" ;;\n";
00066 }
00067
00068 }