While the Gazette was offline, has written more DarkWyrm hard lessons about programming with haiku. The appearance of the 15 Part provides the occasion to summarize the missed items.
# 2: C + + STL Strings and more
The second Lesson raises first a look at C + + strings from the standard library and some of those useful methods such as find_first_not_of . Then it goes further with the introduction of other STL containers ( map , set , multimap, multiset ) And container adapter ( queue , , stack priority_queue) governing the type of access to each container. Then all the methods are described in the various containers that their contents can be manipulated.That's a lot of wood! But do not worry if you do not internalize it all again first, second or third can work through. The Haiku API offers Blist and Trackers BObjectList tools that you can almost always be used as alternatives to containers. The situation is similar with C + + strings and haikus bString . Basically, it's just good about this Things to know, especially when one is dealing with other people's code and ported sources. And of course if you want to write platform independent code as possible.
# 3: Streams and exceptions
In the third Part First, all the C + + versions of the cin in / output streams court , and cerr presented. This only shows the C-variant of a program that prints a file to the console, and then the C + + variant. Then, get useful methods of In / output streams as , getline , write and seekp discussed and the possibilities the error analysis.On we go with the input / output and the formatting means cin and court and their manipulators.
On exceptions made only very briefly, and play in Haiku not matter much anyway because the API offers a good analysis of errors and exceptions cost quite a bit of performance.
# 4: Version control
Lesson 4 puts a little pause in terms of programming and is dedicated to a topic, often neglecting the hobbyists: the blessings of version control. If you use it, change the source code can be easily reversed or try different solutions in a simple manner. The cooperation with others is much easier.DarkWyrm provides some systems this briefly before, CVS, SVN, Git, Mercurial, and then practice to demonstrate the device on the basis of Mercurial.
may Recently, incidentally, the IDE Paladin handle these version control systems.
# 5: Practice - Download project files Paladin
To have learned the previous lessons to deepen with a practical example, shows the fifth Lesson all the techniques presented to Paladin project files to read.# 6-11: Review of the previous "rate"
Parts 6 to 11 shall be filed later later. It will be slightly revised Chapters from the first C + + course "Learning to Program with haiku.# 12: Attributes
With Lesson 12 are general C + + topics completed and will be launched to Haiku API. We start with attributes, as they hang with their own data files and how to use the system-wide attributes.# 13: Queries
Having demonstrated the last time working with attributes that might Part 13 the search for them by means of queries on the plan. It explains the syntax of a query term in Trackers Find panel and how to do that programmatically implements. Besides the possibility of a simple bString as search string, it is also the somewhat complicated variant of assembling with "Reverse Polish Notation (RPN). Finallyis also shown the special category of Live Query, where you will be informed by BMessages when the hit list has changed, if files have been added or dropped out of the search pattern.
# 14: Node monitoring
The monitoring of files and folders and alerts when mounting partitions, shows Lesson 14 another key feature of haiku. Similar queries will be carried live BMessages informed if has done something in a folder or file has been modified. About what changes you informed would be, can define themselves precisely.# 15: Custom file types
Lesson 15 shows how people from its program creates a new file types. In addition to its own MIME type can be, inter alia, a file extension, Description and Icon award and set the application to open this file by default. Slightly more complicated is the definition of a "sniffer Rule": you can with files of this type are always using the same features in the building "sniffed out" automatically. Last but not leastto a file type always the same system-wide attributes are attached, as for example with AUDIO: artist , AUDIO: title and AUDIO: album for MP3 files is the case.
All parts of "Programming with Haiku" can be found in DarkWyrm's Library .
0 comments:
Post a Comment