remove files unneeded for lttv
[lttv.git] / lttv / doc / developer / developer_guide / html / x50.html
CommitLineData
7cb02901 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2<HTML
3><HEAD
4><TITLE
5>Using the reading context</TITLE
6><META
7NAME="GENERATOR"
8CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9REL="HOME"
10TITLE="Linux Trace Toolkit Viewer Developer Guide"
11HREF="index.html"><LINK
12REL="UP"
13TITLE="How to use the Linux Trace Toolkit Viewer's Reading Context"
14HREF="c40.html"><LINK
15REL="PREVIOUS"
16TITLE="Why an event driven trace reader ?"
17HREF="x46.html"><LINK
18REL="NEXT"
19TITLE="Linux Trace Toolkit Viewer Graphical Module Tutorial"
20HREF="c67.html"></HEAD
21><BODY
22CLASS="sect1"
23BGCOLOR="#FFFFFF"
24TEXT="#000000"
25LINK="#0000FF"
26VLINK="#840084"
27ALINK="#0000FF"
28><DIV
29CLASS="NAVHEADER"
30><TABLE
31SUMMARY="Header navigation table"
32WIDTH="100%"
33BORDER="0"
34CELLPADDING="0"
35CELLSPACING="0"
36><TR
37><TH
38COLSPAN="3"
39ALIGN="center"
40>Linux Trace Toolkit Viewer Developer Guide</TH
41></TR
42><TR
43><TD
44WIDTH="10%"
45ALIGN="left"
46VALIGN="bottom"
47><A
48HREF="x46.html"
49ACCESSKEY="P"
50>Prev</A
51></TD
52><TD
53WIDTH="80%"
54ALIGN="center"
55VALIGN="bottom"
56>Chapter 2. How to use the Linux Trace Toolkit Viewer's Reading Context</TD
57><TD
58WIDTH="10%"
59ALIGN="right"
60VALIGN="bottom"
61><A
62HREF="c67.html"
63ACCESSKEY="N"
64>Next</A
65></TD
66></TR
67></TABLE
68><HR
69ALIGN="LEFT"
70WIDTH="100%"></DIV
71><DIV
72CLASS="sect1"
73><H1
74CLASS="sect1"
75><A
76NAME="AEN50"
77>2.3. Using the reading context</A
78></H1
79><P
80>&#13;If you have read the tutorials about writing a text and a graphic module, you
81should be fairly ready to use the information provided to your hook by the
82reading API.
83</P
84><P
85>&#13;The data structures of the reading context are based on the gobject, a
86object-oriented library from the glib. Some evolved types that are found in the
87context also comes from the "glib" (GArray, GHashTable and so on). For detailed
88information about "gobjects" and the "glib", see the <A
89HREF="http://www.gtk.org"
90TARGET="_top"
91>www.gtk.org</A
92> website. They provide a complete
93API reference about the data types they provide.
94</P
95><P
96>&#13;The reading context is object oriented. It is described by the lttv/tracecontext.h
97header. Is can be illustrated with this UML class diagram :
98</P
99><P
100>&#13;<DIV
101CLASS="mediaobject"
102><P
103><IMG
104SRC="lttv-context.png"
105ALIGN="center"><DIV
106CLASS="caption"
107><P
108>Linux Trace Toolkit Viewer Reading Context Class Diagram</P
109></DIV
110></P
111></DIV
112>
113</P
114><P
115>&#13;Though, for performance's sake, navigating through it is not as encapsulated as
116it could. Consider the class attributes to be all public (no get/set functions).
117Sometimes, iteration upon a specific element can be uneasy. For example, you may
118have to get the number of tracefiles in a trace from the "vt" field of the trace
119context to be able to iterate over all the tracefiles contained by the trace.
120</P
121><P
122>&#13;To facilitate the common operations on the reading context, LTTV now provides a
123header that consists of simple macros : lttv/contextmacros.h. It gives an object
124look-and-feel to the context classes. Simple "GET" macros can be used to easily
125access the different fields are iterate over the elements (and get the total
126number of elements too).
127</P
128></DIV
129><DIV
130CLASS="NAVFOOTER"
131><HR
132ALIGN="LEFT"
133WIDTH="100%"><TABLE
134SUMMARY="Footer navigation table"
135WIDTH="100%"
136BORDER="0"
137CELLPADDING="0"
138CELLSPACING="0"
139><TR
140><TD
141WIDTH="33%"
142ALIGN="left"
143VALIGN="top"
144><A
145HREF="x46.html"
146ACCESSKEY="P"
147>Prev</A
148></TD
149><TD
150WIDTH="34%"
151ALIGN="center"
152VALIGN="top"
153><A
154HREF="index.html"
155ACCESSKEY="H"
156>Home</A
157></TD
158><TD
159WIDTH="33%"
160ALIGN="right"
161VALIGN="top"
162><A
163HREF="c67.html"
164ACCESSKEY="N"
165>Next</A
166></TD
167></TR
168><TR
169><TD
170WIDTH="33%"
171ALIGN="left"
172VALIGN="top"
173>Why an event driven trace reader ?</TD
174><TD
175WIDTH="34%"
176ALIGN="center"
177VALIGN="top"
178><A
179HREF="c40.html"
180ACCESSKEY="U"
181>Up</A
182></TD
183><TD
184WIDTH="33%"
185ALIGN="right"
186VALIGN="top"
187>Linux Trace Toolkit Viewer Graphical Module Tutorial</TD
188></TR
189></TABLE
190></DIV
191></BODY
192></HTML
193>
This page took 0.05658 seconds and 4 git commands to generate.