<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1998</year>
<year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
The contents of this file are subject to the Erlang Public License,
Version 1.1, (the "License"); you may not use this file except in
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
The Initial Developer of the Original Code is Ericsson AB.
</legalnotice>
<title>orber_tc</title>
<prepared>Lars Thorsén</prepared>
<responsible>Lars Thorsén</responsible>
<docno></docno>
<approved>Lars Thorsén</approved>
<checked></checked>
<date>1998-04-20</date>
<rev>A</rev>
</header>
<module>orber_tc</module>
<modulesummary>Help functions for IDL typecodes</modulesummary>
<description>
<p>This module contains some functions that gives support in creating
IDL typecodes that can be used in for example the any types typecode field.
For the simple types it is meaningless to use this API but the functions exist
to get the interface complete.</p>
<p>The type <c>TC</c> used below describes an IDL type and is a tuple according
to the to the Erlang language mapping.</p>
</description>
<funcs>
<func>
<name>null() -> TC</name>
<name>void() -> TC</name>
<name>short() -> TC</name>
<name>unsigned_short() -> TC</name>
<name>long() -> TC</name>
<name>unsigned_long() -> TC</name>
<name>long_long() -> TC</name>
<name>unsigned_long_long() -> TC</name>
<name>wchar() -> TC</name>
<name>float() -> TC</name>
<name>double() -> TC</name>
<name>boolean() -> TC</name>
<name>char() -> TC</name>
<name>octet() -> TC</name>
<name>any() -> TC</name>
<name>typecode() -> TC</name>
<name>principal() -> TC</name>
<fsummary>Return the IDL typecode</fsummary>
<desc>
<p>These functions return the IDL typecodes for simple types.</p>
</desc>
</func>
<func>
<name>object_reference(Id, Name) -> TC</name>
<fsummary>Return the object_reference IDL typecode</fsummary>
<type>
<v>Id = string()</v>
<d>the repository ID</d>
<v>Name = string()</v>
<d>the type name of the object</d>
</type>
<desc>
<p>Function returns the IDL typecode for object_reference.</p>
</desc>
</func>
<func>
<name>struct(Id, Name, ElementList) -> TC</name>
<fsummary>Return the struct IDL typecode</fsummary>
<type>
<v>Id = string()</v>
<d>the repository ID</d>
<v>Name = string()</v>
<d>the type name of the struct</d>
<v>ElementList = [{MemberName, TC}]</v>
<d>a list of the struct elements</d>
<v>MemberName = string()</v>
<d>the element name</d>
</type>
<desc>
<p>Function returns the IDL typecode for struct.</p>
</desc>
</func>
<func>
<name>union(Id, Name, DiscrTC, Default, ElementList) -> TC</name>
<fsummary>Return the union IDL typecode</fsummary>
<type>
<v>Id = string()</v>
<d>the repository ID</d>
<v>Name = string()</v>
<d>the type name of the union</d>
<v>DiscrTC = TC</v>
<d>the typecode for the unions discriminant</d>
<v>Default = integer()</v>
<d>a value that indicates which tuple in the element list that is default (value < 0 means no default)</d>
<v>ElementList = [{Label, MemberName, TC}]</v>
<d>a list of the union elements</d>
<v>Label = term()</v>
<d>the label value should be of the <em>DiscrTC</em>type</d>
<v>MemberName = string()</v>
<d>the element name</d>
</type>
<desc>
<p>Function returns the IDL typecode for union.</p>
</desc>
</func>
<func>
<name>enum(Id, Name, ElementList) -> TC</name>
<fsummary>Return the enum IDL typecode</fsummary>
<type>
<v>Id = string()</v>
<d>the repository ID</d>
<v>Name = string()</v>
<d>the type name of the enum</d>
<v>ElementList = [MemberName]</v>
<d>a list of the enums elements</d>
<v>MemberName = string()</v>
<d>the element name</d>
</type>
<desc>
<p>Function returns the IDL typecode for enum.</p>
</desc>
</func>
<func>
<name>string(Length) -> TC</name>
<fsummary>Return the string IDL typecode</fsummary>
<type>
<v>Length = integer()</v>
<d>the length of the string (0 means unbounded)</d>
</type>
<desc>
<p>Function returns the IDL typecode for string.</p>
</desc>
</func>
<func>
<name>wstring(Length) -> TC</name>
<fsummary>Return the wstring IDL typecode</fsummary>
<type>
<v>Length = integer()</v>
<d>the length of the wstring (0 means unbounded)</d>
</type>
<desc>
<p>Function returns the IDL typecode for wstring.</p>
</desc>
</func>
<func>
<name>fixed(Digits, Scale) -> TC</name>
<fsummary>Return the fixed IDL typecode</fsummary>
<type>
<v>Digits = Scale = integer()</v>
<d>the digits and scale parameters of a Fixed type</d>
</type>
<desc>
<p>Function returns the IDL typecode for fixed.</p>
</desc>
</func>
<func>
<name>sequence(ElemTC, Length) -> TC</name>
<fsummary>Return the sequence IDL typecode</fsummary>
<type>
<v>ElemTC = TC</v>
<d>the typecode for the sequence elements</d>
<v>Length = integer()</v>
<d>the length of the sequence (0 means unbounded)</d>
</type>
<desc>
<p>Function returns the IDL typecode for sequence.</p>
</desc>
</func>
<func>
<name>array(ElemTC, Length) -> TC</name>
<fsummary>Return the array IDL typecode</fsummary>
<type>
<v>ElemTC = TC</v>
<d>the typecode for the array elements</d>
<v>Length = integer()</v>
<d>the length of the array</d>
</type>
<desc>
<p>Function returns the IDL typecode for array.</p>
</desc>
</func>
<func>
<name>alias(Id, Name, AliasTC) -> TC</name>
<fsummary>Return the alias IDL typecode</fsummary>
<type>
<v>Id = string()</v>
<d>the repository ID</d>
<v>Name = string()</v>
<d>the type name of the alias</d>
<v>AliasTC = TC</v>
<d>the typecode for the type which the alias refer to</d>
</type>
<desc>
<p>Function returns the IDL typecode for alias.</p>
</desc>
</func>
<func>
<name>exception(Id, Name, ElementList) -> TC</name>
<fsummary>Return the exception IDL typecode</fsummary>
<type>
<v>Id = string()</v>
<d>the repository ID</d>
<v>Name = string()</v>
<d>the type name of the exception</d>
<v>ElementList = [{MemberName, TC}]</v>
<d>a list of the exception elements</d>
<v>MemberName = string()</v>
<d>the element name</d>
</type>
<desc>
<p>Function returns the IDL typecode for exception.</p>
</desc>
</func>
<func>
<name>get_tc(Object) -> TC</name>
<name>get_tc(Id) -> TC</name>
<fsummary>Fetch typecode</fsummary>
<type>
<v>Object = record()</v>
<d>an IDL specified struct, union or exception</d>
<v>Id = string()</v>
<d>the repository ID</d>
</type>
<desc>
<p>If the get_tc/1 gets a record that is and IDL specified
struct, union or exception as a parameter it returns the
typecode.</p>
<p>If the parameter is a repository ID it uses the Interface Repository
to get the typecode.</p>
</desc>
</func>
<func>
<name>check_tc(TC) -> boolean()</name>
<fsummary>Check syntax of an IDL typecode</fsummary>
<desc>
<p>Function checks the syntax of an IDL typecode.</p>
</desc>
</func>
</funcs>
</erlref>