Remote Procedures --
Pronunciation:
PUBLIC PronunciationType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, word];
CrRPC.PutRope[s, dictionary];
};
GetResults: CrRPC.GetResultsProc ~ {
string ¬ CrRPC.GetRope[s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~12 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
Analyze:
PUBLIC AnalyzeType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, word];
CrRPC.PutRope[s, language];
};
GetResults: CrRPC.GetResultsProc ~ {
analyses ¬ CrRPC.GetRope[s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~2 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
SearchForWord:
PUBLIC SearchForWordType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, unparsedClasses];
CrRPC.PutInt16[s, minKeyWords];
CrRPC.PutInt16[s, minWord];
CrRPC.PutInt16[s, maxWord];
CrRPC.PutRope[s, dictionary];
};
GetResults: CrRPC.GetResultsProc ~ {
intersectionResults ¬ UProc1[h, s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~16 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
Synonyms:
PUBLIC SynonymsType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, word];
CrRPC.PutRope[s, dictionary];
};
GetResults: CrRPC.GetResultsProc ~ {
synonymClasses ¬ UProc2[h, s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~17 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
GetDefinition:
PUBLIC GetDefinitionType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, word];
CrRPC.PutRope[s, dictionary];
};
GetResults: CrRPC.GetResultsProc ~ {
definition.definition ¬ CrRPC.GetRope[s];
definition.runs ¬ UProc3[h, s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~11 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
GetLanguages:
PUBLIC GetLanguagesType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, user];
};
GetResults: CrRPC.GetResultsProc ~ {
languages ¬ UProc4[h, s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~1 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
NewSearchForWord:
PUBLIC NewSearchForWordType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
MProc5[h, s, synonymClasses];
CrRPC.PutInt16[s, minKeyWords];
CrRPC.PutInt16[s, minWord];
CrRPC.PutInt16[s, maxWord];
CrRPC.PutRope[s, dictionary];
};
GetResults: CrRPC.GetResultsProc ~ {
intersectionResults ¬ UProc1[h, s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~18 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
Conjugate:
PUBLIC ConjugateType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, word];
CrRPC.PutRope[s, form];
CrRPC.PutRope[s, alternates];
CrRPC.PutRope[s, language];
};
GetResults: CrRPC.GetResultsProc ~ {
conjugations ¬ UProc6[h, s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~8 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
ProofRead:
PUBLIC ProofReadType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, paragraph];
CrRPC.PutRope[s, language];
};
GetResults: CrRPC.GetResultsProc ~ {
selection.start ¬ CrRPC.GetInt16[s];
selection.length ¬ CrRPC.GetInt16[s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~4 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
Enumerate:
PUBLIC EnumerateType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutInt32[s, wordNumber];
CrRPC.PutRope[s, dictionary];
};
GetResults: CrRPC.GetResultsProc ~ {
definitions.definition ¬ CrRPC.GetRope[s];
definitions.runs ¬ UProc3[h, s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~14 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
EnumerateRaw:
PUBLIC EnumerateRawType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutInt32[s, wordNumber];
MProc7[h, s, codes];
CrRPC.PutRope[s, dictionary];
};
GetResults: CrRPC.GetResultsProc ~ {
rawDefinition ¬ UProc8[h, s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~15 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
Dictionaries:
PUBLIC DictionariesType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, user];
};
GetResults: CrRPC.GetResultsProc ~ {
dictionariesAvailable ¬ UProc9[h, s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~10 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
Corrections:
PUBLIC CorrectionsType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, word];
CrRPC.PutRope[s, language];
};
GetResults: CrRPC.GetResultsProc ~ {
words ¬ UProc10[h, s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~5 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
RawSearchForWord:
PUBLIC RawSearchForWordType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
MProc5[h, s, synonymClasses];
CrRPC.PutInt16[s, minKeyWords];
CrRPC.PutInt16[s, minWord];
CrRPC.PutInt16[s, maxWord];
CrRPC.PutRope[s, dictionary];
};
GetResults: CrRPC.GetResultsProc ~ {
rawIntersectionResults ¬ UProc11[h, s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~19 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
CountWords:
PUBLIC CountWordsType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, paragraph];
CrRPC.PutRope[s, language];
};
GetResults: CrRPC.GetResultsProc ~ {
longInteger ¬ CrRPC.GetInt32[s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~7 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
GetLooks:
PUBLIC GetLooksType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, dictionary];
};
GetResults: CrRPC.GetResultsProc ~ {
looks ¬ UProc12[h, s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~13 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
ConvertWordNumber:
PUBLIC ConvertWordNumberType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutInt32[s, wordNumber];
CrRPC.PutRope[s, language];
};
GetResults: CrRPC.GetResultsProc ~ {
word ¬ CrRPC.GetRope[s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~3 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
Status:
PUBLIC StatusType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
};
GetResults: CrRPC.GetResultsProc ~ {
string ¬ CrRPC.GetRope[s];
};
CrRPC.Call[h~h, remotePgm~1313, remotePgmVersion~1, remoteProc~6 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
Unmarshal / Marshal Procs --
UProc11:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: RawIntersectionResults] ~ {
{
length14: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[RawIntersectionResultsObject[length14]];
FOR i13:
CARDINAL
IN [0..length14)
DO
res.body[i13].keys ¬ UProc10[h, s];
res.body[i13].results ¬ UProc15[h, s];
ENDLOOP;
};
};
UProc10:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: Words] ~ {
{
length17: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[WordsObject[length17]];
FOR i16:
CARDINAL
IN [0..length17)
DO
res.body[i16] ¬ CrRPC.GetRope[s];
ENDLOOP;
};
};
UProc8:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: RawDefinition] ~ {
{
length19: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[RawDefinitionObject[length19]];
FOR i18:
CARDINAL
IN [0..length19)
DO
res.body[i18].type ¬ CrRPC.GetRope[s];
res.body[i18].text ¬ CrRPC.GetRope[s];
res.body[i18].defaultFont ¬ CrRPC.GetRope[s];
res.body[i18].runs ¬ UProc3[h, s];
ENDLOOP;
};
};
UProc4:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: Languages] ~ {
{
length21: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[LanguagesObject[length21]];
FOR i20:
CARDINAL
IN [0..length21)
DO
res.body[i20] ¬ CrRPC.GetRope[s];
ENDLOOP;
};
};
UProc12:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: Looks] ~ {
{
length23: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[LooksObject[length23]];
FOR i22:
CARDINAL
IN [0..length23)
DO
res.body[i22] ¬ UProc24[h, s];
ENDLOOP;
};
};
UProc9:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: DictionariesAvailable] ~ {
{
length26: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[DictionariesAvailableObject[length26]];
FOR i25:
CARDINAL
IN [0..length26)
DO
res.body[i25] ¬ CrRPC.GetRope[s];
ENDLOOP;
};
};
UProc24:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: Looks2] ~ {
{
length28: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[Looks2Object[length28]];
FOR i27:
CARDINAL
IN [0..length28)
DO
res.body[i27] ¬ CrRPC.GetRope[s];
ENDLOOP;
};
};
MProc5:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM, val: SynonymClasses] ~ {
CrRPC.PutCard16[s, val.length];
FOR i29:
CARDINAL
IN [0..val.length)
DO
MProc30[h, s, val.body[i29]];
ENDLOOP;
};
UProc2:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: SynonymClasses] ~ {
{
length32: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[SynonymClassesObject[length32]];
FOR i31:
CARDINAL
IN [0..length32)
DO
res.body[i31] ¬ UProc33[h, s];
ENDLOOP;
};
};
UProc15:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: Integers] ~ {
{
length35: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[IntegersObject[length35]];
FOR i34:
CARDINAL
IN [0..length35)
DO
res.body[i34] ¬ CrRPC.GetInt32[s];
ENDLOOP;
};
};
UProc3:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: Runs] ~ {
{
length37: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[RunsObject[length37]];
FOR i36:
CARDINAL
IN [0..length37)
DO
res.body[i36].start ¬ CrRPC.GetInt16[s];
res.body[i36].length ¬ CrRPC.GetInt16[s];
res.body[i36].font ¬ CrRPC.GetRope[s];
ENDLOOP;
};
};
MProc7:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM, val: Codes] ~ {
CrRPC.PutCard16[s, val.length];
FOR i38:
CARDINAL
IN [0..val.length)
DO
CrRPC.PutRope[s, val.body[i38]];
ENDLOOP;
};
UProc6:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: Conjugations] ~ {
{
length40: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[ConjugationsObject[length40]];
FOR i39:
CARDINAL
IN [0..length40)
DO
res.body[i39].partsOfSpeech ¬ CrRPC.GetRope[s];
res.body[i39].definition ¬ CrRPC.GetRope[s];
res.body[i39].status ¬ CrRPC.GetRope[s];
ENDLOOP;
};
};
MProc30:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM, val: SynonymClass] ~ {
CrRPC.PutCard16[s, val.length];
FOR i41:
CARDINAL
IN [0..val.length)
DO
CrRPC.PutRope[s, val.body[i41]];
ENDLOOP;
};
UProc1:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: IntersectionResults] ~ {
{
length43: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[IntersectionResultsObject[length43]];
FOR i42:
CARDINAL
IN [0..length43)
DO
res.body[i42].keys ¬ UProc10[h, s];
res.body[i42].results ¬ UProc10[h, s];
ENDLOOP;
};
};
UProc33:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: SynonymClass] ~ {
{
length45: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[SynonymClassObject[length45]];
FOR i44:
CARDINAL
IN [0..length45)
DO
res.body[i44] ¬ CrRPC.GetRope[s];
ENDLOOP;
};
};
}...