1%%-------------------------------------------------------------------- 2%% 3%% %CopyrightBegin% 4%% 5%% Copyright Ericsson AB 1997-2016. All Rights Reserved. 6%% 7%% Licensed under the Apache License, Version 2.0 (the "License"); 8%% you may not use this file except in compliance with the License. 9%% You may obtain a copy of the License at 10%% 11%% http://www.apache.org/licenses/LICENSE-2.0 12%% 13%% Unless required by applicable law or agreed to in writing, software 14%% distributed under the License is distributed on an "AS IS" BASIS, 15%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16%% See the License for the specific language governing permissions and 17%% limitations under the License. 18%% 19%% %CopyrightEnd% 20%% 21%% 22%%---------------------------------------------------------------------- 23%% File : orber_ifr_primitivedef.erl 24%% Purpose : Code for Primitivedef 25%%---------------------------------------------------------------------- 26 27-module(orber_ifr_primitivedef). 28 29-export(['_get_def_kind'/1, 30 destroy/1, 31 cleanup_for_destroy/1, %not in CORBA 2.0 32 '_get_type'/1, 33 '_get_kind'/1 34 ]). 35 36-import(orber_ifr_utils,[get_field/2 37 ]). 38 39-include("orber_ifr.hrl"). 40 41%%%====================================================================== 42%%% PrimitiveDef (IDLType(IRObject)) 43 44%%%---------------------------------------------------------------------- 45%%% Interfaces inherited from IRObject 46 47'_get_def_kind'({ObjType, ObjID}) ?tcheck(ir_PrimitiveDef, ObjType) -> 48 orber_ifr_irobject:'_get_def_kind'({ObjType,ObjID}). 49 50destroy({ObjType, ObjID}) ?tcheck(ir_PrimitiveDef, ObjType) -> 51 F = fun() -> ObjList = cleanup_for_destroy({ObjType, ObjID}), 52 orber_ifr_irobject:destroy([{ObjType,ObjID} | ObjList]) 53 end, 54 orber_ifr_utils:ifr_transaction_write(F). 55 56cleanup_for_destroy({ObjType,ObjID}) ?tcheck(ir_PrimitiveDef, ObjType) -> 57 orber_ifr_idltype:cleanup_for_destroy({ObjType,ObjID}). 58 59%%%---------------------------------------------------------------------- 60%%% Interfaces inherited from IDLType 61 62'_get_type'({ObjType, ObjID}) ?tcheck(ir_PrimitiveDef, ObjType) -> 63 orber_ifr_idltype:'_get_type'({ObjType, ObjID}). 64 65%%%---------------------------------------------------------------------- 66%%% Non-inherited interfaces 67 68'_get_kind'({ObjType, ObjID}) ?tcheck(ir_PrimitiveDef, ObjType) -> 69 get_field({ObjType,ObjID},kind). 70 71