.TH "md_src_plugins_type_README" 3elektra "Sun May 29 2016" "Version 0.8.14" "Elektra" \" -*- nroff -*- .ad l .nh .SH NAME md_src_plugins_type_README \- README .IP "\(bu" 2 infos = Information about type plugin is in keys below .IP "\(bu" 2 infos/author = Markus Raab elektra@libelektra.org .IP "\(bu" 2 infos/licence = BSD .IP "\(bu" 2 infos/needs = .IP "\(bu" 2 infos/provides = check .IP "\(bu" 2 infos/placements = presetstorage .IP "\(bu" 2 infos/description = Copies meta data to keys using typebing .PP .PP This plugin is a type checker plugin using the \fCCOBRA\fP data types\&. .PP .SS "Additional Information" .PP A common and successful type system happens to be CORBA with IDL\&. The system is outstanding because of the many mappings it provides to other programming languages\&. .PP The type checker plugin supports all basic CORBA types: \fCshort\fP, \fCunsigned_short\fP, \fClong\fP, \fCunsigned_long\fP, \fClong_long\fP, \fCunsigned_long_long\fP, \fCfloat\fP, \fCdouble\fP, \fCchar\fP, \fCboolean\fP, \fCany\fP and \fCoctet\fP\&. In Elektra \fCoctet\fP is the same as \fCchar\fP\&. When checking any it will always be successful, regardless of the content\&. Elektra also added other types\&. \fCempty\fP will only yield true if there is no value\&. \fCstring\fP allows any non-empty sequence of octets\&. .PP Sometimes the type should expresses that, for example, both an empty or another type is valid\&. In Elektra a space-separated list of types expresses that\&. If any of those types match, the whole type is valid\&. For example, the type \fCstring empty\fP equals the type \fCany\fP\&. This facility builds a union of the sets of instances existing types specify\&. .PP \fCenum\fP works with a list of choices\&. Any of these choices confirms to the type, others do not\&. For example, the type FSType accepts all file system names, for example, ext2, jfs or vfat\&. .PP The \fCCORBA\fP type system goes far beyond these basic types\&. In IDL, it is also allowed to define classes, interfaces and generic containers\&. These user-defined types are however not useful on a single Key\&. .PP To sum up, many basic types like int or char are convenient and CORBA ensures that they can be converted to the specific type of the programming language\&. .PP .SS "Restrictions" .PP The \fCCORBA\fP type system also has its limits\&. The types \fCstring\fP and \fCenum\fP, however, can be unsatisfactory\&. While string is too general and makes no limit on how the sequence of characters is structured, the enumeration is too finite\&. For example, it is not possible to say that a string is not allowed to have a specific symbol in it\&.