%% -*- mode: LaTeX -*-
%%
%% Copyright (c) 1997, 1999 The University of Utah and the Computer Systems
%% Laboratory at the University of Utah (CSL).
%%
%% This file is part of Flick, the Flexible IDL Compiler Kit.
%%
%% Flick is free software; you can redistribute it and/or modify it under the
%% terms of the GNU General Public License as published by the Free Software
%% Foundation; either version 2 of the License, or (at your option) any later
%% version.
%%
%% Flick is distributed in the hope that it will be useful, but WITHOUT ANY
%% WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
%% FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
%% details.
%%
%% You should have received a copy of the GNU General Public License along with
%% Flick; see the file COPYING.  If not, write to the Free Software Foundation,
%% 59 Temple Place #330, Boston, MA 02111, USA.
%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Presentation Generators}
\label{sec:Presentation Generators}

Flick has four different presentation generators: one to produce CORBA-style C
language stubs, a second to produce CORBA-style C++ stubs, a third to produce
ONC~RPC (\program{rpcgen}-style) stubs, and a fourth to produce special stubs
for use in Utah's Fluke operating system.  (As previously mentioned, Flick's
MIG-style presentation generator is conjoined with the MIG front end.)  A
presentation generator can be invoked to produce either the client-side stubs
or the server-side dispatch function, but not both at the same time.  Simply
run a presentation generator twice, with different options, to produce both
files; for example:

\begin{verbatim}
        flick-c-pfe-corba -c -o foo-client.prc foo.aoi     # make client
        flick-c-pfe-corba -s -o foo-server.prc foo.aoi     # make server
\end{verbatim}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Command Line Options}
\label{subsec:PG:Command Line Options}

Each presentation generator accepts the following options in addition to those
described in Section~\ref{subsec:Common Command Line Options}:

\begin{optionlist}
  \item[-c \oroption{} --client] Generate client stubs.  This is the default if
  neither \option{-c} nor \option{-s} is specified.  This option cannot be
  combined with \option{-s}.

  \item[-s \oroption{} --server] Generate server skeletons.  This option cannot
  be combined with \option{-c}.

  \item[-a \oroption{} --async_stubs] Generate nonstandard ``decomposed'' stubs
  instead of normal, synchronous RPC stubs.  This experimental feature is
  currently implemented only in the CORBA C language presentation
  generator.\footnote{Decomposed stubs are not currently described in this
  document.  For more information about Flick's support for asynchronous,
  decomposed stubs, see Eide et al., ``Flexible and Optimized IDL Compilation
  for Distributed Applications,'' published in the Proceedings of the LCR~'98
  workshop and available from the Flick Web pages at \flickurl{}.}

  %% \item[--with_sids]

  %% \item[--client_stubs_for_inherited_operations]

  %% \item[--server_funcs_for_inherited_operations]
\end{optionlist}

In addition, there are many, many options for changing the
\cfunction{printf}-like format strings that the presentation generator uses to
produce the names of various presentation elements.  (Use \option{--usage} to
see them all.)  These name format options exist only for short-term use; all of
these options will eventually be replaced by a more general
presentation-modification facility.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Additional Comments}
\label{subsec:PG:Additional Comments}

\subsubsection{General}
\label{subsubsec:PG:General}

There are still some unwarranted dependencies between certain front ends and
presentation generators.  Although the CORBA and ONC~RPC front ends both
produce AOI files, the CORBA and ONC~RPC presentation generators are still
``tuned'' to the AOI constructs generated by the respective front ends.  This
means that at the moment, the CORBA and Fluke presentation generators can input
only AOI files generated by the CORBA front end, and similarly, that the
ONC~RPC presentation generator can input only AOI files generated by the
ONC~RPC front end.  This will eventually be corrected.

\subsubsection{CORBA}
\label{subsubsec:PG:CORBA}

The CORBA C language presentation generator does not produce CORBA-style
allocator functions for constructed data types (as described in Section~14.8 of
the CORBA~2.0 specification).  Flick's CORBA runtime does provide a generic
\cfunction{CORBA_alloc} function, however, which takes a single argument
indicating the number of bytes to be allocated.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% End of file.

