The Type System
At the most basic level of the GObject framework lies a generic and dynamic type system called GType. The GType system holds a runtime description of all objects allowing glue code to facilitate multiple language bindings. The type system can handle any singly inherited class structure, in addition to non-classed types such as opaque pointers, strings, and variously sized integers and floating point numbers.
The type system knows how to copy, assign, and destroy values belonging to any of the registered types. This is trivial for types like integers, but many complex objects are reference-counted, while some are complex but not reference-counted. When the type system “copies” a reference-counted object, it will typically just increase its reference count, whereas when copying a complex, non-reference-counted object (such as a string), it will typically create an actual copy by allocating memory.
This basic functionality is used for implementing GValue, a type of generic container that can hold values of any type known by the type system. Such containers are particularly useful when interacting with dynamically typed language environments in which all native values reside in such type-tagged containers.
Read more about this topic: GObject
Famous quotes containing the words type and/or system:
“Time has an undertaking establishment on every block and drives his coffin nails faster than the steam riveters rivet or the stenographers type or the tickers tick out fours and eights and dollar signs and ciphers.”
—John Dos Passos (18961970)
“The truth is, the whole administration under Roosevelt was demoralized by the system of dealing directly with subordinates. It was obviated in the State Department and the War Department under [Secretary of State Elihu] Root and me [Taft was the Secretary of War], because we simply ignored the interference and went on as we chose.... The subordinates gained nothing by his assumption of authority, but it was not so in the other departments.”
—William Howard Taft (18571930)