C API Functions |
Return the specific language variety of the current (open) Understand database.
The language returned is most often used in conjunction with Udb_mask_language to determine the general language type (Ada, C, or Fortran) of the database.
Only one Understand database can be open at any time.
#include "udb/udb.h" UdbLanguage udbDbLanguage(void)
There are no arguments to udbDbLanguage.
UdbDbLanuage returns one of the following values specifying the language and variety of the Understand database.
.
The following values are also available for use as a bitwise mask with the above language return values. See example usage below.
Udb_mask_languageC
C
Udb_mask_languageFortran
Fortran
Udb_mask_languageAda
Ada
Udb_mask_language
Use as bitwise mask to determine general language type as shown below.
Udb_languageC
Project Database is C/C++ Language
Udb_languageAda
Project Database is Ada
Udb_languageFortran
Project Database is Fortran
The following example obtains the language of the database and performs a bitwise AND with Udb_mask_language to determine the general language type.
language = udbDbLanguage(); switch (language & Udb_mask_language) { case Udb_languageC : ... case Udb_languageFortran : ... case Udb_languageAda : ... }
The following uses the general language mask Udb_mask_languageC to determine if the specific variety of language is C.
isLanguageC = (lang & Udb_mask_languageC);
udbEntityLanguage to get the language of a particular entity.
Scientific Toolworks, Inc. http://www.scitools.com Voice: (802) 763-2995 Fax: (802) 763-3066 support@scitools.com sales@scitools.com |