1
0
Fork 0
lvspec/raterspec.cls

192 lines
4.1 KiB
OpenEdge ABL
Raw Normal View History

% LoVullo rater specification class
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{raterspec}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{lvspec}}
\ProcessOptions\relax
% we're an extension of the base lvspec
\LoadClass[insuranceterms]{lvspec}
%%
% Default package includes
%
% Note that these are not all the packages that are available; see the
% raterspec/ directory in the lvspec repo
%
\RequirePackage{raterspec/param}
\RequirePackage{raterspec/class}
\RequirePackage{raterspec/question}
\RequirePackage{raterspec/rates}
\RequirePackage{raterspec/form}
\RequirePackage{raterspec/c1import}
\RequirePackage{lvflow}
%\RequirePackage{premcalc}
%%
% Formatting
%
% we gots some big section numbers
\renewcommand\l@subsubsection{\@dottedtocline{3}{7em}{4.6em}}
%%
% Rater-specific specification additions
%
% This should be called before beginning the documet environment
%
\def\@RaterProgramName#1{
\gdef\@lvspec@pretitle{%
#1 Supplier\\Specifications:\\
\vspace{0.5em}%
}
\gdef\@lvspec@premarktitle{#1:\space}
\abstract{%
This document is a formal specification for the integration of
\@title@short{} with the Dwelling Program of the Quote Server, Program
UI and~ConceptOne. This document should contain all information
necessary to complete a conforming implementation with minimal
clarification and will serve as a reference for future development,
including bug fixes and feature requests.
}
}
\terminology{%
\subsection{Rater Terminology}
\input{dfn/rater}
}
%% note: \pnumoff and \pnumon are temporary kluges (...hopefully)
%%
% Beginning of document
%
% The host environment is the same for all new systems
%
\def\@raterspec@input@types{
\PackageWarning{raterspec}{Missing program-specific input parameter types!}
\todo{No input parameter types have been defined.}
}
\def\@raterspec@input@params{
\PackageWarning{raterspec}{Missing input parameters!}
\todo{No input parameters have been defined.}
}
\def\@lvspec@posttitle{
\pnumoff\part{General System}\pnumon
\chapter{Host Environment}
\input{raterspec/sec/hostenv}
\chapter{Input Data}
\index{input data|(}
\input{raterspec/sec/input}
% implementation-specific parameter types
\section{Program-Specific Parameter Types}
\sectiondept{it/uw}
\@raterspec@input@types
\index{input data|)}
\chapter{Input Parameters}
\index{input data!parameters|(}
\index{parameter|(}
\input{raterspec/sec/params}
\@raterspec@input@params
\index{input data!parameters|)}
\index{parameter|)}
}
\def\inputtypes#1{
\gdef\@raterspec@input@types{
% can't really include a sigline here because approvial would be global
\pnumoff
Parameter types in this section are common to the \@title@short\ program.
\pnumon
\index{parameter type|(}
\input{#1}
\index{parameter type|)}
}
}
\def\inputparams#1{
\gdef\@raterspec@input@params{
\input{#1}
}
}
%%
% Code generation
%
% Right now the code generation is tightly coupled with the packages that it
% is applicable to; they need to be refactored and hooks added
\newwrite\@@codegen
\immediate\openout\@@codegen=gen.xml
\def\@codegen{%
\begingroup
% prepare common cases for plain-text output
\def\sref##1{the specification}%
\def~{ }%
\def\emph{}%
\def\nobreakspace{ }%
\def\${}%
\@do@codegen
}
\def\@do@codegen#1{%
\immediate\write\@@codegen{#1}%
\endgroup
}
%%
% Misc
%
\def\@firstchar #1#2||{#1}
\def\@secondchar #1#2#3||{#2}
\def\@ifnumeric#1{{%
\edef\@@chk{\@firstchar#1||}%
% determine if this is a number
\def\@@result{0}%
% strip any negative sign
\ifnum\expandafter`\@@chk=`-
\edef\@@chk{\@secondchar#1--||}%
\fi
% perform number check
\ifnum\expandafter`\@@chk<`0\else
\ifnum\expandafter`\@@chk>`9\else
% is a number
\def\@@result{1}%
\fi
\fi
% use the result to output a conditional that will match a closing \fi
\aftergroup\ifnum
\expandafter\aftergroup\@@result
\aftergroup=%
\aftergroup1%
\aftergroup\relax
}}
\def\beginundersletter{%
\begingroup% ended by \@dotypedef
\catcode`\_=11\relax
}
\def\endundersletter{%
\endgroup
}