~ubuntu-branches/ubuntu/quantal/mysql-workbench/quantal

« back to all changes in this revision

Viewing changes to library/grt/summary.dox

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2012-03-01 21:57:30 UTC
  • Revision ID: package-import@ubuntu.com-20120301215730-o7y8av8y38n162ro
Tags: upstream-5.2.38+dfsg
ImportĀ upstreamĀ versionĀ 5.2.38+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*! @defgroup GRT GRT Library
 
2
@page GRT GRT Library
 
3
 
 
4
@image html grt_overview.png "Workbench architecture"
 
5
 
 
6
@section grtctx The GRT Context
 
7
 
 
8
@section grtvalue GRT Values
 
9
 
 
10
GRT Values are reference counted objects encapsulating simple values (integer,
 
11
double or string), containers such as lists and dictionaries and objects.
 
12
Lists are typed and can contain anything, but recommended content types are limited
 
13
to simple values and objects. Objects can contain members of any type as well
 
14
and their contents are defined by a metaclass (aka GRT struct). Objects can also
 
15
contain methods and signals.
 
16
 
 
17
Simple values are immutable, ie. the contents of a value will never change,
 
18
unlike lists, dicts and objects.
 
19
 
 
20
Lists and dicts are obviously mutable, so if you have references to the
 
21
same list in 2 different places and one of them modifies the list, both
 
22
references will see the updated list. That doesn't happen with simple values.
 
23
 
 
24
For convenience, GRT values have wrapper classes that provide automatic
 
25
reference counting and several utility methods. Any allocation, access or
 
26
reference to a GRT value should be done through these wrappers (classes that
 
27
end in Ref) as they will make sure that reference counting is always
 
28
kept correct, avoiding memory leaks.
 
29
 
 
30
Objects are defined in a XML file, but are actually implemented as C++
 
31
classes. However these classes are automatically generated from the XML
 
32
definitions. Objects can be directly accessed through these C++ classes but
 
33
can also be accessed from scripting languages, as the metaclasses contain
 
34
everything needed for object "reflection".
 
35
 
 
36
Object contents are initialized when the object is constructed. Their default
 
37
values is 0 unless a different value is specified in the XML file.
 
38
Lists and dictionaries are also allocated, but object references are initially set to
 
39
NULL. Lists and dictionaries are assigned to their owner object and cannot be
 
40
replaced externally.
 
41
 
 
42
 
 
43
@section grtmetaclass Metaclasses
 
44
 
 
45
Metaclasses describe the contents of a GRT object. They are used for
 
46
generation C++ classes that implement the GRT objects and also for exposing
 
47
these objects to scripting languages.
 
48
 
 
49
 
 
50
@section grtmodule Modules
 
51
 
 
52
Modules are collection of functions that can be written in C++ or any of the
 
53
supported scripting languages.
 
54
 
 
55
 
 
56
*/
 
57
 
 
58
 
 
59
 
 
60
 
 
61
/* @defgroup GRTInternal GRT Library Internals
 
62
 
 
63
Internal classes and functions of the GRT library. Not meant to be used by code
 
64
outside of the GRT.
 
65
 
 
66
*/