Code
NewsArticles
Casting in C++
- Monday 31st May
Common standard C++ extensions are templates, run-time type indentification RTTI, namespaces and exceptions. We will focus on an another new extension of C++ : Casting in C++. New casting operator are introduced.
The C++ draft standard includes the following four casting operator:
static_cast
const_cast
dynamic_cast
reinterpret_cast
Casts are used to convert a type to an another type. Some conversions are performed automatically by the compiler. These conversions are (...)
Design Pattern : Creational Pattern Singleton - Monday 9th August
Introduction
It’s important for some classes to have exactly one instance. For example have only one GUI, one engine.
To implement a singleton pattern, a common way is to define a class that has a protected constructor and a public static member function to create and retrieve an instance of the class.
Implementation
class Singleton
public: static Singleton *GetInstance (); protected: Singleton(); private: static Singleton *Instance; ;
(...)
Libraries on Linux - Posix system - Monday 19th April
Scope of this article is to see possibilies of libraries on linux - posix system :
static libraries
shared libraries
dynamically loaded libraries (DLL).
For portable libraries, you should look two tools:
GNU Libtool http://www.gnu.org/software/libtool/libtool.html
Glib http://developer.gnome.org/doc/API/glib/glib-dynamic-loading-of-modules.html
STATIC LIBRARIES
Static libraries are a collection of ordinary object files; conventionally, static libraries end with the (...)
Presentation of fltk version2 - Friday 31st December
Introduction :
Please visit http://www.fltk.org/ to have some information about this C++ GUI toolkit.
You can find lot of GUI toolkit. But I mean to start learn principle of a GUI toolkit, it’s better to start with a light and multi-platform.
Example :
I start with a easy example who use fltk version2. I choose version 2 of fltk while this version respect more actually C++ coding.
Attached source code and screenshot :
(...)
Programming Object Oriented - Wednesday 21st April
For long time, I search free online books about Programming Object Oriented ,C++ , Design Pattern ...
I find Bruce Eckel’s Free Electronic Books.
So I can only mention a link. But, often some goods ressources disappear. So as Eckel porposal , I do mirror of this books.
This reading is a good introduction of OO coding before start a project for example in C++.
C++
Thinking in C++, 2nd edition, Volume 1 Revision 13 - Sept 27, 2001
Thinking in C++, Volume 2: (...)
Templates in C++ - Sunday 1st February
Describe use of templates in C++
Inheritance , surdefinition and polymorphisme allow you to reuse object code, but that doesn’t solve all your reuse needs. Templates allow you to reuse source code by providing the compiler with a way to substitute type names in the body of a class or function.
What are Templates ?
Templates are mechanisms for generating functions and classes based on type parameters. They provide generic way to develop reusable code. There are two basic types of (...)
Tokenizer in C++ - Thursday 5th August
Tokenize string in C++ is a usual task in coding. For example to read an input file.
My self, I intend to tokenize a geometrical gmsh file. It looks like :
Point(2) = (1,0,0,0.1);
I use a C++ STL String Tokenizer from http://codeproject.com/cpp/stringtok.asp
The class and example are attached.
Author : hackervalley@free.fr http://hackervalley.free.fr
Copyright (c) 2003 hackervalley Permission is granted to copy, distribute and/or modify this document under the terms of (...)
Common standard C++ extensions are templates, run-time type indentification RTTI, namespaces and exceptions. We will focus on an another new extension of C++ : Casting in C++. New casting operator are introduced.
The C++ draft standard includes the following four casting operator:




Casts are used to convert a type to an another type. Some conversions are performed automatically by the compiler. These conversions are (...)
Design Pattern : Creational Pattern Singleton - Monday 9th August
Introduction
It’s important for some classes to have exactly one instance. For example have only one GUI, one engine.
To implement a singleton pattern, a common way is to define a class that has a protected constructor and a public static member function to create and retrieve an instance of the class.
Implementation
class Singleton
public: static Singleton *GetInstance (); protected: Singleton(); private: static Singleton *Instance; ;
(...)
Libraries on Linux - Posix system - Monday 19th April
Scope of this article is to see possibilies of libraries on linux - posix system :



For portable libraries, you should look two tools:
GNU Libtool http://www.gnu.org/software/libtool/libtool.html
Glib http://developer.gnome.org/doc/API/glib/glib-dynamic-loading-of-modules.html
STATIC LIBRARIES
Static libraries are a collection of ordinary object files; conventionally, static libraries end with the (...)
Presentation of fltk version2 - Friday 31st December
Introduction :
Please visit http://www.fltk.org/ to have some information about this C++ GUI toolkit.
You can find lot of GUI toolkit. But I mean to start learn principle of a GUI toolkit, it’s better to start with a light and multi-platform.
Example :
I start with a easy example who use fltk version2. I choose version 2 of fltk while this version respect more actually C++ coding.
Attached source code and screenshot :
(...)
Programming Object Oriented - Wednesday 21st April
For long time, I search free online books about Programming Object Oriented ,C++ , Design Pattern ...
I find Bruce Eckel’s Free Electronic Books.
So I can only mention a link. But, often some goods ressources disappear. So as Eckel porposal , I do mirror of this books.
This reading is a good introduction of OO coding before start a project for example in C++.
C++
Thinking in C++, 2nd edition, Volume 1 Revision 13 - Sept 27, 2001
Thinking in C++, Volume 2: (...)
Templates in C++ - Sunday 1st February
Describe use of templates in C++
Inheritance , surdefinition and polymorphisme allow you to reuse object code, but that doesn’t solve all your reuse needs. Templates allow you to reuse source code by providing the compiler with a way to substitute type names in the body of a class or function.
What are Templates ?
Templates are mechanisms for generating functions and classes based on type parameters. They provide generic way to develop reusable code. There are two basic types of (...)
Tokenizer in C++ - Thursday 5th August
Tokenize string in C++ is a usual task in coding. For example to read an input file.
My self, I intend to tokenize a geometrical gmsh file. It looks like :
Point(2) = (1,0,0,0.1);
I use a C++ STL String Tokenizer from http://codeproject.com/cpp/stringtok.asp
The class and example are attached.
Author : hackervalley@free.fr http://hackervalley.free.fr
Copyright (c) 2003 hackervalley Permission is granted to copy, distribute and/or modify this document under the terms of (...)