<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;D0cGR3syfyp7ImA9WhRaFEw.&quot;"><id>tag:blogger.com,1999:blog-410844370589841835</id><updated>2012-02-16T09:57:06.597-08:00</updated><category term="ruby" /><category term="server" /><category term="GObject-Learning" /><category term="gitorious" /><category term="ubuntu" /><category term="OpenEmbedded" /><category term="compiler" /><category term="tutorial" /><category term="llvm" /><title>elpam</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://another-half-elpam.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://another-half-elpam.blogspot.com/" /><author><name>maple</name><uri>http://www.blogger.com/profile/16184517246768873107</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Elpam" /><feedburner:info uri="elpam" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0YNSXo-fSp7ImA9Wx9VGEk.&quot;"><id>tag:blogger.com,1999:blog-410844370589841835.post-391381133033169224</id><published>2011-02-04T09:39:00.000-08:00</published><updated>2011-02-04T09:39:58.455-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-04T09:39:58.455-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="compiler" /><category scheme="http://www.blogger.com/atom/ns#" term="llvm" /><title>notices for using llvm bitcode</title><content type="html">If someone use ANTLR3 and LLVM 2.7 to construct a compiler, I believe some of my notices/hints written here will be very very useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;1. function's parameter is read only. you should use "alloca" to create a "local variable" to make function parameter writable.&lt;/li&gt;
&lt;li&gt;each "basic block" should have a "terminate" instruction. -&amp;gt; br and ret&lt;/li&gt;
&lt;li&gt;each "function module" should have only one "ret" instruction. only one!!!!!!!!!!&lt;/li&gt;
&lt;blockquote&gt;here's my solution： create a "entry block" and "return block". puts every "alloca" to "entry block" and create a "alloca" for return variable. Puts "ret" instruction in "return block". If other statement need to return different return value, I just store "return variable" and "br" to "return block".&lt;/blockquote&gt;&lt;li&gt;ANTLR3's tree walker is great to write "multiple pass" symbol table constructor. But it's a little&amp;nbsp;inconvenient&amp;nbsp;for LLVM IR generator.&lt;/li&gt;
&lt;blockquote&gt;&amp;nbsp;EX) conditional block, if() ：I need to use IR Builder to create a conditional jump before it's&amp;nbsp;successor not created. &amp;nbsp;When antlr3 walk to this point, my program still don't know how many elsif and else success behind me.&lt;/blockquote&gt;My Solution：Create your own IR to present statement structure. (only statement)&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;b&gt;LLVM is ssa system&lt;/b&gt;.&lt;/div&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&amp;nbsp;But it's impossible to let all of your expression be ssa form (just my experience).&amp;nbsp;&lt;/li&gt;
&lt;li&gt;I just using alloca to present cross-statement variable, store these variable to "stack" instead SSA is much good choice for me.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;If you want to fully utilize SSA's&amp;nbsp;benefit, you should write your own IR to&amp;nbsp;present an expression. Using ANTLR3's grammar tree, you don't need to worry about your IR's operator priority. Just be careful for assignment's LHF and RHS.&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/410844370589841835-391381133033169224?l=another-half-elpam.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/cCT7EFwhPeP_Iy07zrDuyCf-wcQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cCT7EFwhPeP_Iy07zrDuyCf-wcQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/cCT7EFwhPeP_Iy07zrDuyCf-wcQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cCT7EFwhPeP_Iy07zrDuyCf-wcQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Elpam/~4/ZcuFZZALFjo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://another-half-elpam.blogspot.com/feeds/391381133033169224/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://another-half-elpam.blogspot.com/2011/02/notices-for-using-llvm-bitcode.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/391381133033169224?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/391381133033169224?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Elpam/~3/ZcuFZZALFjo/notices-for-using-llvm-bitcode.html" title="notices for using llvm bitcode" /><author><name>maple</name><uri>http://www.blogger.com/profile/16184517246768873107</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://another-half-elpam.blogspot.com/2011/02/notices-for-using-llvm-bitcode.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8EQn0zcSp7ImA9Wx9VF0k.&quot;"><id>tag:blogger.com,1999:blog-410844370589841835.post-2402089452100647290</id><published>2011-02-03T07:43:00.000-08:00</published><updated>2011-02-03T07:43:23.389-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-03T07:43:23.389-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="compiler" /><title>symbol mangling (compiler)</title><content type="html">in the past year (2010), I'm working for a "action script" like language compiler.&lt;br /&gt;
Integrate with LLVM and ANTLR3, It's really easy to come out a "worked and lots of buggies" compiler. My target code is not just execute on a hardware, and it's not designed for general purpose. According to above situation, design a GOOD enough environment to verify my works. &lt;br /&gt;
&lt;br /&gt;
 1. there's no entry point for these program. (main function). I need to design another way to invoke my function. Either integrate with "C/C++" or just using cheat mangling to create a main function.&lt;br /&gt;
 2. Because our platform target is very specially, the function signatures are different between language level and "llvm bitcode" level. (for other purpose, will append function parameter and change parameter types). If I want to using C/C++ to call my llvm bitcode, I need to get correct script name mangling and invoke function with correct parameters.&lt;br /&gt;
&lt;br /&gt;
........mmmmm  just mumbling. After read NameMangling: http://en.wikipedia.org/wiki/Name_mangling#Complex_example .&lt;br /&gt;
&lt;br /&gt;
I think i need to change my old/stupid mangling design.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/410844370589841835-2402089452100647290?l=another-half-elpam.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/R_TZEDfS4WNL4Z1XetR1jXdpJ90/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/R_TZEDfS4WNL4Z1XetR1jXdpJ90/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/R_TZEDfS4WNL4Z1XetR1jXdpJ90/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/R_TZEDfS4WNL4Z1XetR1jXdpJ90/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Elpam/~4/y1cMm2RSCTw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://another-half-elpam.blogspot.com/feeds/2402089452100647290/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://another-half-elpam.blogspot.com/2011/02/symbol-mangling-compiler.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/2402089452100647290?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/2402089452100647290?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Elpam/~3/y1cMm2RSCTw/symbol-mangling-compiler.html" title="symbol mangling (compiler)" /><author><name>maple</name><uri>http://www.blogger.com/profile/16184517246768873107</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://another-half-elpam.blogspot.com/2011/02/symbol-mangling-compiler.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkEHSXg4eCp7ImA9Wx9WFkU.&quot;"><id>tag:blogger.com,1999:blog-410844370589841835.post-74536223897204875</id><published>2011-01-22T01:30:00.000-08:00</published><updated>2011-01-22T01:30:38.630-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-22T01:30:38.630-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="server" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="gitorious" /><title>Hint for gitorious</title><content type="html">2011, Jan.&lt;br /&gt;
&lt;br /&gt;
  If you want to install/construct your own gitorious server on your ubuntu 10.10LTS.&lt;br /&gt;
Please remember do not use ruby 1.9.1 &lt;br /&gt;
  &lt;br /&gt;
  There's too many compatiable issue need to be fixed.&lt;br /&gt;
If you just a newbie with RoR. just use 1.8, don't challenge it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/410844370589841835-74536223897204875?l=another-half-elpam.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/x-4QS7WaDoKbSdlvLAvAIgc8T5Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x-4QS7WaDoKbSdlvLAvAIgc8T5Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/x-4QS7WaDoKbSdlvLAvAIgc8T5Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x-4QS7WaDoKbSdlvLAvAIgc8T5Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Elpam/~4/iq3hfDwnTHA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://another-half-elpam.blogspot.com/feeds/74536223897204875/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://another-half-elpam.blogspot.com/2011/01/hint-for-gitorious.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/74536223897204875?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/74536223897204875?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Elpam/~3/iq3hfDwnTHA/hint-for-gitorious.html" title="Hint for gitorious" /><author><name>maple</name><uri>http://www.blogger.com/profile/16184517246768873107</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://another-half-elpam.blogspot.com/2011/01/hint-for-gitorious.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQMSHc7eip7ImA9WxBTFko.&quot;"><id>tag:blogger.com,1999:blog-410844370589841835.post-4253309283685680852</id><published>2009-12-12T07:28:00.000-08:00</published><updated>2009-12-12T18:13:09.902-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-12T18:13:09.902-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="GObject-Learning" /><category scheme="http://www.blogger.com/atom/ns#" term="tutorial" /><title>GObject - First Vala Programming</title><content type="html">&lt;pre name="code" class="php"&gt;&lt;br /&gt;svn checkout http://gobject-learing.googlecode.com/svn/trunk/ gobject-learing-read-only&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;為達到最佳效果，請使用以上指令下載範例碼並與以下投影片一起服用。&lt;br /&gt;&lt;br /&gt;Coppy from &lt;a url="http://en.wikipedia.org/wiki/Vala_(programming_language)"&gt;wiki:Vala &lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'lucida grande';"&gt;&lt;b&gt;&lt;i&gt;"Vala is a programming language that was created with the goal of bringing modern language features to C, without additional runtime requirements and with little overhead, by targeting the GObject object system. It was developed by Jürg Billeter and Raffaele Sandrini. The syntax borrows heavily from C#. Rather than being compiled directly to assembler or to an intermediate language, Vala is compiled to C which is then compiled with the platform's standard C compiler."&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;According above description, any program written by Vala could translate to standard C code. So I add this topic between GObject tutorial. Because it really save our time for development.&lt;br /&gt;&lt;br /&gt;I rewrote the sample previous GObject example by using Vala. You will find those boring redundant code are no longer need to self-written.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Php"&gt;&lt;br /&gt;/* 6-1 - maman-bar.vala */&lt;br /&gt;public class MamanBar : Object {&lt;br /&gt;public int a;&lt;br /&gt;public int b;&lt;br /&gt;&lt;br /&gt;public MamanBar(){&lt;br /&gt;      a = 1; b = 2;&lt;br /&gt;}&lt;br /&gt;public void dumpall() {&lt;br /&gt;      stdout.printf ("a = %d b = %d\n",a,b);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Php"&gt;&lt;br /&gt;#&gt; valac -o maman-bar-vala maman-bar.vala main.vala&lt;br /&gt;#&gt; ./maman-bar-vala&lt;br /&gt;a = 1 b = 2&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I would like to demo how to connect vala and c together. We use the same C code from previous sample.&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt;int main (int argc, char *argv[])&lt;br /&gt;{&lt;br /&gt; /* this function should be executed first. Before everything  */&lt;br /&gt; g_type_init();&lt;br /&gt;&lt;br /&gt; /* Create our object */&lt;br /&gt; MamanBar *bar = maman_bar_new();&lt;br /&gt; maman_bar_dumpall( bar );&lt;br /&gt;&lt;br /&gt; return 0;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The only difference are compile commands.&lt;br /&gt;&lt;pre name="code" class="Php"&gt;&lt;br /&gt;#&gt; valac -C -H maman-bar.h  maman-bar.vala&lt;br /&gt;#&gt; cc `pkg-config --cflags glib-2.0 gtk+-2.0`   -c -o main.o main.c&lt;br /&gt;#&gt; cc `pkg-config --cflags glib-2.0 gtk+-2.0`   -c -o maman-bar.o maman-bar.c&lt;br /&gt;#&gt; cc -o maman-bar-c main.o maman-bar.o `pkg-config --libs glib-2.0 gtk+-2.0`&lt;br /&gt;#&gt; ./maman-bar-c&lt;br /&gt;a = 1 b = 2&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/410844370589841835-4253309283685680852?l=another-half-elpam.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jCe9R-4rfFmoT4882nJv057ImmY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jCe9R-4rfFmoT4882nJv057ImmY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/jCe9R-4rfFmoT4882nJv057ImmY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jCe9R-4rfFmoT4882nJv057ImmY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Elpam/~4/0A8bwNQsEvw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://another-half-elpam.blogspot.com/feeds/4253309283685680852/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://another-half-elpam.blogspot.com/2009/12/svn-checkout-httpgobject-learing.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/4253309283685680852?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/4253309283685680852?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Elpam/~3/0A8bwNQsEvw/svn-checkout-httpgobject-learing.html" title="GObject - First Vala Programming" /><author><name>elpam</name><uri>http://www.blogger.com/profile/14361720676691454795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://another-half-elpam.blogspot.com/2009/12/svn-checkout-httpgobject-learing.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIGQ38ycCp7ImA9WxBTFUQ.&quot;"><id>tag:blogger.com,1999:blog-410844370589841835.post-5882040692840128255</id><published>2009-12-11T07:38:00.000-08:00</published><updated>2009-12-11T20:35:22.198-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-11T20:35:22.198-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="GObject-Learning" /><title>GObject - Virtual Function</title><content type="html">&lt;pre name="code" class="php"&gt;&lt;br /&gt;svn checkout http://gobject-learing.googlecode.com/svn/trunk/ gobject-learing-read-only&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;為達到最佳效果，請使用以上指令下載範例碼並與以下&lt;a href="http://docs.google.com/present/view?id=dcxwdrjr_0ddfkmfdr"&gt;投影片&lt;/a&gt;一起服用。&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- 以下是正文  --&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;b&gt;= Member Function =&lt;br /&gt;&lt;/b&gt;&lt;/span&gt; : the functions which have a self parameter&lt;br /&gt;&lt;br /&gt;If you ever write python code to implement about CLASS. The class member function may look like bellow:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt;def f(self):&lt;br /&gt;    return 'hello world'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You can find out the first parameter always be class itself. And the function will use 'self' to access the member value. The same principle we use in GObject programming.&lt;br /&gt;We always use thiz (instead this, because C++ syntax) for first parameter in each member functions. Whether public function or private function.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;= Public Member Function =&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;: What's different between "Just Function" and "Public Member Function"?&lt;br /&gt;&lt;br /&gt;Same as C++, in GObject programming, all the functions define in the class structure header with first self parameter are public member functions.&lt;br /&gt;In example 5-1 we use a public member function to replace what we done in main.c, dump all member value.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt;void maman_bar_dump_all_value( MamanBar* thiz )&lt;br /&gt;{&lt;br /&gt;    printf(" bar-&gt;a = (%d) bar-&gt;b = (%d)\n", thiz-&gt;a, thiz-&gt;b );&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;b&gt;= Private Member Function =&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;: just simple rule, static functions (with first self parameter) are private&lt;br /&gt;&lt;br /&gt;It's too simple. I believe we don't need to explain this idea.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;b&gt;&lt;br /&gt;= Member Function with Virtual Feature =&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt;&lt;br /&gt;/* 5-2 */&lt;br /&gt;/* maman-bar.h */&lt;br /&gt;struct _MamanBarClass {&lt;br /&gt;    GObjectClass parent;&lt;br /&gt;    /* class members */&lt;br /&gt;&lt;br /&gt;    void (* incAll) ( MamanBar* );&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;/* maman-bar.c */&lt;br /&gt;static void maman_bar_class_init ( MamanBarClass* class)&lt;br /&gt;{&lt;br /&gt;    class-&gt;incAll = maman_bar_inc_all;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In this step, we need to explain what's different between MamanBar and MamanBarClass. We use g_object_new to allocate a memory size from heap, and g_object_new invoke function maman_bar_init to initialize this memory region. But different from MamanBar, MamanBarClass should only exists one copy during one time period.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt;    maman_bar_dump_all_value( bar );&lt;br /&gt;    MAMAN_BAR_GET_CLASS( bar ) -&gt; incAll(bar);&lt;br /&gt;    maman_bar_dump_all_value( bar );&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In above sample code, you can see we use MAMAN_BAR_GET_CLASS to access CLASS structure, and use it to invoke the class member functions.&lt;br /&gt;The whole idea in virtual function is child class will use it's member function replace the parent class's member function pointer.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;b&gt;= Virtual Function =&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Base on example 4-2. We implement sub-bar class and replace the parent's class function pointer.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt;/* 5-3 */&lt;br /&gt;/* sub-bar.c */&lt;br /&gt;static void sub_bar_class_init ( SubBarClass* class)&lt;br /&gt;{&lt;br /&gt;    MamanBarClass* parent_class = class;&lt;br /&gt;    parent_class-&gt;incAll = sub_bar_inc_all;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;After constructor invoke (base_init and class_init ...), we can invoke child function by using parent's fp. It's simple and easy to use.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt;/* main.c */&lt;br /&gt;    SubBar *subbar = g_object_new (SUB_BAR_TYPE, NULL);&lt;br /&gt;    sub_bar_dump_all_value( subbar );&lt;br /&gt;    MAMAN_BAR_GET_CLASS( subbar ) -&gt; incAll( subbar );&lt;br /&gt;    sub_bar_dump_all_value( subbar );&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/410844370589841835-5882040692840128255?l=another-half-elpam.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RNR2z6Q2Pulr3yXqtyJEU36dNkY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RNR2z6Q2Pulr3yXqtyJEU36dNkY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RNR2z6Q2Pulr3yXqtyJEU36dNkY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RNR2z6Q2Pulr3yXqtyJEU36dNkY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Elpam/~4/1oAyAmDAIS8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://another-half-elpam.blogspot.com/feeds/5882040692840128255/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://another-half-elpam.blogspot.com/2009/12/gobject-virtual-function.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/5882040692840128255?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/5882040692840128255?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Elpam/~3/1oAyAmDAIS8/gobject-virtual-function.html" title="GObject - Virtual Function" /><author><name>elpam</name><uri>http://www.blogger.com/profile/14361720676691454795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://another-half-elpam.blogspot.com/2009/12/gobject-virtual-function.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MFSHw5cCp7ImA9WxNaFkk.&quot;"><id>tag:blogger.com,1999:blog-410844370589841835.post-4248774452563217695</id><published>2009-11-30T21:30:00.000-08:00</published><updated>2009-11-30T21:30:19.228-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-30T21:30:19.228-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="GObject-Learning" /><title>Gobject - Inherit (Chinese)</title><content type="html">&lt;pre name="code" class="php"&gt;svn checkout http://gobject-learing.googlecode.com/svn/trunk/ gobject-learing-read-only 
&lt;/pre&gt;&lt;br /&gt;
Of course, you can download the source by using above command.&lt;br /&gt;
I found there's some different between GLIB v2.0 and v2.2.&lt;br /&gt;
So I rewrote the example code. and separated the "STEPS" more detail.&lt;br /&gt;
&lt;br /&gt;
I believe it will be helpfull for someone(?) who wanna study GObject in dummy. &lt;br /&gt;
&lt;br /&gt;
&lt;div style="width:425px;text-align:left" id="__ss_2619149"&gt;&lt;a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/elpam/gobject-inherit-chinese" title="Gobject - Inherit (Chinese)"&gt;Gobject - Inherit (Chinese)&lt;/a&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=gobject-learning-class-4-cht-091130203637-phpapp01&amp;stripped_title=gobject-inherit-chinese" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=gobject-learning-class-4-cht-091130203637-phpapp01&amp;stripped_title=gobject-inherit-chinese" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"&gt;View more &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/"&gt;documents&lt;/a&gt; from &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/elpam"&gt;Kai-Feng Chou&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
* BTW. i give up Google Doc in this time. because it can't not upload odf file. and i don't want to twit the slide every time :( .&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/410844370589841835-4248774452563217695?l=another-half-elpam.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tLXCWWgR4Btev_W8plXoZak6_vM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tLXCWWgR4Btev_W8plXoZak6_vM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tLXCWWgR4Btev_W8plXoZak6_vM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tLXCWWgR4Btev_W8plXoZak6_vM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Elpam/~4/VpSdFb1m5EE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://another-half-elpam.blogspot.com/feeds/4248774452563217695/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://another-half-elpam.blogspot.com/2009/11/gobject-inherit-chinese.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/4248774452563217695?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/4248774452563217695?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Elpam/~3/VpSdFb1m5EE/gobject-inherit-chinese.html" title="Gobject - Inherit (Chinese)" /><author><name>maple</name><uri>http://www.blogger.com/profile/16184517246768873107</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://another-half-elpam.blogspot.com/2009/11/gobject-inherit-chinese.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UDRHs4eCp7ImA9WxNaEk0.&quot;"><id>tag:blogger.com,1999:blog-410844370589841835.post-785771598556952383</id><published>2009-11-25T18:07:00.000-08:00</published><updated>2009-11-25T18:07:55.530-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-25T18:07:55.530-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="OpenEmbedded" /><title>OpenEmbedded Build Process</title><content type="html">I Just draw a diagram to explain the OpenEmbedded build process for internal project. If it's useful for someone else, just take it.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- Google Docs --&gt;&lt;br /&gt;
&lt;iframe frameborder="0" height="559" src="http://docs.google.com/present/embed?id=dcxwdrjr_90gwtnk3fq&amp;amp;size=l" width="700"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- Slide Share --&gt;&lt;br /&gt;
&lt;div style="width:425px;text-align:left" id="__ss_2586808"&gt;&lt;a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/elpam/open-embedded-build-process-one-page" title="Open Embedded Build Process (One Page)"&gt;Open Embedded Build Process (One Page)&lt;/a&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=openembeddedbuildprocessonepage-091125200543-phpapp02&amp;stripped_title=open-embedded-build-process-one-page" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=openembeddedbuildprocessonepage-091125200543-phpapp02&amp;stripped_title=open-embedded-build-process-one-page" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"&gt;View more &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/"&gt;documents&lt;/a&gt; from &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/elpam"&gt;Kai-Feng Chou&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/410844370589841835-785771598556952383?l=another-half-elpam.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Ryp6QqMy2ufv8SkprbmNfoohU8U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ryp6QqMy2ufv8SkprbmNfoohU8U/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Ryp6QqMy2ufv8SkprbmNfoohU8U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ryp6QqMy2ufv8SkprbmNfoohU8U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Elpam/~4/hlRqACUeCxM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://another-half-elpam.blogspot.com/feeds/785771598556952383/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://another-half-elpam.blogspot.com/2009/11/openembedded-build-process.html#comment-form" title="1 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/785771598556952383?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/785771598556952383?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Elpam/~3/hlRqACUeCxM/openembedded-build-process.html" title="OpenEmbedded Build Process" /><author><name>maple</name><uri>http://www.blogger.com/profile/16184517246768873107</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://another-half-elpam.blogspot.com/2009/11/openembedded-build-process.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUIAQX45eSp7ImA9WxNaEk0.&quot;"><id>tag:blogger.com,1999:blog-410844370589841835.post-9028650044447381541</id><published>2009-11-23T20:01:00.000-08:00</published><updated>2009-11-25T19:52:20.021-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-25T19:52:20.021-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="GObject-Learning" /><title>OOP in C - Before GObject</title><content type="html">&lt;pre name="code" class="php"&gt;svn checkout http://gobject-learing.googlecode.com/svn/trunk/ gobject-learing-read-only 
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
為達到最佳效果，請使用以上指令下載範例碼並與以下&lt;a href="http://docs.google.com/present/view?id=dcxwdrjr_48d9s4tdhb"&gt;投影片&lt;/a&gt;一起服用。&lt;br /&gt;
&lt;br /&gt;
we need to try write something before GObject programming. It let us understand more for "WHY USING GOBJECT". I write some example file, you can try to rewrite them after you read the slide and sample code.&lt;br /&gt;
&lt;br /&gt;
Enjoy It.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- Google Docs --&gt;&lt;br /&gt;
&lt;iframe src="http://docs.google.com/present/embed?id=dcxwdrjr_71fbmffqdn&amp;size=m" frameborder="0" width="555" height="451"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- Slide Share --&gt;&lt;br /&gt;
&lt;div style="width:425px;text-align:left" id="__ss_2587200"&gt;&lt;a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/elpam/oop-in-c-before-gobject-2587200" title="OOP in C - Before GObject"&gt;OOP in C - Before GObject&lt;/a&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=gobject-learning-class-3-cht-091125215033-phpapp02&amp;stripped_title=oop-in-c-before-gobject-2587200" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=gobject-learning-class-3-cht-091125215033-phpapp02&amp;stripped_title=oop-in-c-before-gobject-2587200" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"&gt;View more &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/elpam"&gt;Kai-Feng Chou&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/410844370589841835-9028650044447381541?l=another-half-elpam.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tFLdmL2ftILAWgbdQbTHTp6mel0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tFLdmL2ftILAWgbdQbTHTp6mel0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tFLdmL2ftILAWgbdQbTHTp6mel0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tFLdmL2ftILAWgbdQbTHTp6mel0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Elpam/~4/iOyLKEGoOUk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://another-half-elpam.blogspot.com/feeds/9028650044447381541/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://another-half-elpam.blogspot.com/2009/11/oop-in-c-before-gobject.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/9028650044447381541?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/9028650044447381541?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Elpam/~3/iOyLKEGoOUk/oop-in-c-before-gobject.html" title="OOP in C - Before GObject" /><author><name>elpam</name><uri>http://www.blogger.com/profile/14361720676691454795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://another-half-elpam.blogspot.com/2009/11/oop-in-c-before-gobject.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4DRX8zeCp7ImA9WxNaEE8.&quot;"><id>tag:blogger.com,1999:blog-410844370589841835.post-6671537557873535269</id><published>2009-11-22T05:38:00.000-08:00</published><updated>2009-11-23T17:59:34.180-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-23T17:59:34.180-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="GObject-Learning" /><title>OOP in C - Virtual Function</title><content type="html">&lt;pre class="php" name="code"&gt;svn checkout http://gobject-learing.googlecode.com/svn/trunk/ gobject-learing-read-only 
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
為達到最佳效果，請使用以上指令下載範例碼並與以下&lt;a href="http://docs.google.com/present/view?id=dcxwdrjr_48d9s4tdhb"&gt;投影片&lt;/a&gt;一起服用。&lt;br /&gt;
&lt;br /&gt;
OO的Member Function 其實是可以使用Function Pointer及Structure來描述 (廢話)&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;struct A 
{
int a;
FP  method_a;
};
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
再加上一點技巧, 就可以完成Virtual Function的實作 :) &lt;br /&gt;
Enjoy It.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- Google Docs Presentation --&gt;&lt;br /&gt;
&lt;iframe frameborder="0" height="451" src="http://docs.google.com/present/embed?id=dcxwdrjr_48d9s4tdhb&amp;amp;size=m" width="555"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- Slide Share --&gt;&lt;br /&gt;
&lt;div style="width:425px;text-align:left" id="__ss_2569771"&gt;&lt;a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/elpam/oop-in-c-virtual-function" title="OOP in C - Virtual Function"&gt;OOP in C - Virtual Function&lt;/a&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=gobject-learning-class-2-cht-091123194931-phpapp01&amp;stripped_title=oop-in-c-virtual-function" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=gobject-learning-class-2-cht-091123194931-phpapp01&amp;stripped_title=oop-in-c-virtual-function" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"&gt;View more &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/"&gt;documents&lt;/a&gt; from &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/elpam"&gt;elpam&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/410844370589841835-6671537557873535269?l=another-half-elpam.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LO8V6fQNe_EORwIKoodiSBF735M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LO8V6fQNe_EORwIKoodiSBF735M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LO8V6fQNe_EORwIKoodiSBF735M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LO8V6fQNe_EORwIKoodiSBF735M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Elpam/~4/v_VMhUGsW7Y" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://another-half-elpam.blogspot.com/feeds/6671537557873535269/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://another-half-elpam.blogspot.com/2009/11/svn-checkout-httpgobject-learing.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/6671537557873535269?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/6671537557873535269?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Elpam/~3/v_VMhUGsW7Y/svn-checkout-httpgobject-learing.html" title="OOP in C - Virtual Function" /><author><name>elpam</name><uri>http://www.blogger.com/profile/14361720676691454795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://another-half-elpam.blogspot.com/2009/11/svn-checkout-httpgobject-learing.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkABQXk-cCp7ImA9WxNaEE8.&quot;"><id>tag:blogger.com,1999:blog-410844370589841835.post-6148529213586128040</id><published>2009-11-21T08:08:00.000-08:00</published><updated>2009-11-23T18:12:30.758-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-23T18:12:30.758-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="GObject-Learning" /><title>OOP in C - Inherit</title><content type="html">&lt;pre name="code" class="php"&gt;&lt;br /&gt;svn checkout http://gobject-learing.googlecode.com/svn/trunk/ gobject-learing-read-only  &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;為達到最佳效果，請使用以上指令下載範例碼並與以下&lt;a href="http://docs.google.com/present/view?id=dcxwdrjr_0ddfkmfdr"&gt;投影片&lt;/a&gt;一起服用。&lt;br /&gt;&lt;br /&gt;其實說穿了，整個概念就是以下的程式碼。&lt;br /&gt;&lt;!-- 科科 就是這樣 以下為1-4程式碼--&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt;/* 1-4.h */&lt;br /&gt;&lt;br /&gt;struct A{&lt;br /&gt;&lt;br /&gt;int a;&lt;br /&gt;&lt;br /&gt;int b;&lt;br /&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;struct B{&lt;br /&gt;&lt;br /&gt;struct A parent;&lt;br /&gt;&lt;br /&gt;int c;&lt;br /&gt;&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- Google Docs --&gt;&lt;br /&gt;&lt;iframe src="http://docs.google.com/present/embed?id=dcxwdrjr_48d9s4tdhb&amp;size=m" frameborder="0" width="555" height="451"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- Slide Sahre --&gt;&lt;br /&gt;&lt;div style="width:425px;text-align:left" id="__ss_2565960"&gt;&lt;a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/elpam/g-object-learning-class-1-cht-2565960" title="OOP in C - Inherit"&gt;OOP in C - Inherit&lt;/a&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=gobject-learning-class-1-cht-091123102430-phpapp01&amp;stripped_title=g-object-learning-class-1-cht-2565960" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=gobject-learning-class-1-cht-091123102430-phpapp01&amp;stripped_title=g-object-learning-class-1-cht-2565960" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"&gt;View more &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/"&gt;documents&lt;/a&gt; from &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/elpam"&gt;elpam&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/410844370589841835-6148529213586128040?l=another-half-elpam.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vLfPMNA9eP6T2TOwuUFiwvpW9hY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vLfPMNA9eP6T2TOwuUFiwvpW9hY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vLfPMNA9eP6T2TOwuUFiwvpW9hY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vLfPMNA9eP6T2TOwuUFiwvpW9hY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Elpam/~4/OIp0DZ3l5CU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://another-half-elpam.blogspot.com/feeds/6148529213586128040/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://another-half-elpam.blogspot.com/2009/11/oop-in-c-inherit.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/6148529213586128040?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/6148529213586128040?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Elpam/~3/OIp0DZ3l5CU/oop-in-c-inherit.html" title="OOP in C - Inherit" /><author><name>elpam</name><uri>http://www.blogger.com/profile/14361720676691454795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://another-half-elpam.blogspot.com/2009/11/oop-in-c-inherit.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cARHczeSp7ImA9WxNbF0k.&quot;"><id>tag:blogger.com,1999:blog-410844370589841835.post-6530520132375591685</id><published>2009-11-20T11:17:00.000-08:00</published><updated>2009-11-20T11:24:05.981-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-20T11:24:05.981-08:00</app:edited><title>another half</title><content type="html">well, let's start to sort out what i done before.&lt;div&gt;GObject learning for first. After that i plan to post out the real-mode programming tutorial.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/410844370589841835-6530520132375591685?l=another-half-elpam.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/cfCBxdI1COLDdSAUeM_cUnWKRQw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cfCBxdI1COLDdSAUeM_cUnWKRQw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/cfCBxdI1COLDdSAUeM_cUnWKRQw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cfCBxdI1COLDdSAUeM_cUnWKRQw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Elpam/~4/7pA55o8GoAI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://another-half-elpam.blogspot.com/feeds/6530520132375591685/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://another-half-elpam.blogspot.com/2009/11/another-half.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/6530520132375591685?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/410844370589841835/posts/default/6530520132375591685?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Elpam/~3/7pA55o8GoAI/another-half.html" title="another half" /><author><name>maple</name><uri>http://www.blogger.com/profile/16184517246768873107</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://another-half-elpam.blogspot.com/2009/11/another-half.html</feedburner:origLink></entry></feed>

