Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | List of all members
Lingoona.NativeMethods Class Reference

Public Member Functions

static void clearVariable ([MarshalAs(UnmanagedType.LPWStr)] string name)
 Deletes a named variable. More...
 
static void clearVariables ()
 Deletes all named variables. More...
 
static string generateName ([MarshalAs(UnmanagedType.LPWStr)] string noun, int length, [MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.LPWStr)] string[] components, int ccount)
 Composes a new name from a given noun and an individual amount of additional suffixes. More...
 
static string getLanguage ()
 Retrieve the Grammar Library's current language code. More...
 
static void initialize ()
 Initialize the Grammar Library More...
 
static bool isAvailable ()
 Reports whether the Grammar Library is available. More...
 
static void setLanguage ([MarshalAs(UnmanagedType.LPWStr)] string language)
 Set the Grammar Library's language to be used. More...
 
static void setVariable ([MarshalAs(UnmanagedType.LPWStr)] string name, [MarshalAs(UnmanagedType.LPWStr)] string value)
 Sets a named variable. More...
 
static string useGrammar ([MarshalAs(UnmanagedType.LPWStr)] string template, int length, [MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.LPWStr)] string[] parameters, int pcount)
 Parses a string using the Grammar Library and returns the finalized text. More...
 

Member Function Documentation

static void Lingoona.NativeMethods.clearVariable ( [MarshalAs(UnmanagedType.LPWStr)] string  name)

Deletes a named variable.

Parameters
nameThe name of the variable. Must consist of alphanumerical characters only and start with a letter.
static void Lingoona.NativeMethods.clearVariables ( )

Deletes all named variables.

static string Lingoona.NativeMethods.generateName ( [MarshalAs(UnmanagedType.LPWStr)] string  noun,
int  length,
[MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.LPWStr)] string[]  components,
int  ccount 
)

Composes a new name from a given noun and an individual amount of additional suffixes.

Parameters
nounThe tagged noun to be used, e.g. "sword^n".
lengthThe number of parameters to be passed.
componentsThe actual suffixes, each individual one might be tagged to describe the actual use, e.g. "strong^a".
ccountThe number of parameters passed.
Returns
The finalized, generated name, including gender tags.
static string Lingoona.NativeMethods.getLanguage ( )

Retrieve the Grammar Library's current language code.

Returns
A 2 character language code, e.g. "en", "de", or "fr".
static void Lingoona.NativeMethods.initialize ( )

Initialize the Grammar Library

This function is called by the wrapper and shouldn't be called manually.

static bool Lingoona.NativeMethods.isAvailable ( )

Reports whether the Grammar Library is available.

This function is called by the wrapper and shouldn't be called manually.

Returns
True, if available, false otherwise.
static void Lingoona.NativeMethods.setLanguage ( [MarshalAs(UnmanagedType.LPWStr)] string  language)

Set the Grammar Library's language to be used.

Parameters
languageA 2 character language code, e.g. "en", "de", or "fr".

The available languages depend on your license agreement. Invalid values will fall back to English ("en").

static void Lingoona.NativeMethods.setVariable ( [MarshalAs(UnmanagedType.LPWStr)] string  name,
[MarshalAs(UnmanagedType.LPWStr)] string  value 
)

Sets a named variable.

Parameters
nameThe name of the variable. Must consist of alphanumerical characters only and start with a letter.
valueThe value of the variable.
static string Lingoona.NativeMethods.useGrammar ( [MarshalAs(UnmanagedType.LPWStr)] string  template,
int  length,
[MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.LPWStr)] string[]  parameters,
int  pcount 
)

Parses a string using the Grammar Library and returns the finalized text.

Parameters
templateThe template string to be parsed, e.g. "Greetings, <<1>>!".
lengthThe number of parameters to be passed.
parametersThe actual parameters, each individual onemight be tagged based on their gender, e.g. "dog^n".
pcountThe number of parameters passed.
Returns
The finalized, generated string.

The documentation for this class was generated from the following file: