First Technology Transfer

Standard and Advanced Technical Training, Consultancy and Mentoring

Advanced C++ Programming on Linux

Duration: 5 Days

Intended Audience

The course is for experienced C++ and Linux programmers, who will be adopting a more object oriented approach to Linux application development. Attendees be of an inquisitive dispostion and to an engineering "mind set" - i.e. to be prepared to "get their hands dirty" by trying out new ideas and new programming approaches. The course is oriented towards developers who will be designing and implementing large complex application frameworks that will be running on Linux platforms. The course exercises will, typically, involve working on a core problem, followed by one or more challenges. The challenges are intended to be worked on post course. The course will use the GNU C++ compiler and the Eclipse IDE. The course will also introduce C++11 / C++14 programming features where relevant.


Areas covered in the course will include C++ Graphical User Interface Implementation using Qt5, web application development using the REST protocol, techniques for implementing wrappers around POSIX API functionality, working with pThreads in an object oriented way using the C++11 thread support, object oriented approached to network programming, data persistence and serialisation and processing XML documents using C++. Because there will not be time to cover all these topics in depth the topics that the course will focus on will be tailored to the particular needs of the groups or organisations booking the course. Where required the course can also include a C++ CORBA programming module.


  • An overview of C++ - the language, patterns and idioms
    • Inheritance, Polymorphism and all that
    • Function Objects
    • Templates and the Standard Template Library
    • Mixed C and C++ programming
    • Key patterns - Singleton, Observer, Visitor, Composite
    • Templates and the Standard Template Library
    • Namespaces and scope
  • An overview Linux technologies
    • The POSIX API and its variants
    • Inter-process communication under Linux
    • The Berkeley Sockets API
    • POSIX Threads (p-threads)
    • The Unix file system
    • X windows
  • Techniques for Devising and Implementing Wrapper Classes
    • Operating system resources as objects
    • The create a resource, get a handle, manipulate the resource via system and library calls that take a handle as an argument API model
    • Creating classes corresponding to operating system resources - that contain the handle as a member variable, and methods for manipulating the resource that invoke the underlying system and library calls
  • Extending functionality beyond Wrapper Classes
    • Managing a collection of child processes
    • Devising two way communication with objects that contain a pair of pipes
    • Creating shared memory objects with built in critical sections
  • Working with P-threads the object oriented way
    • Thread support in C++11 and the Boost Threads Library
    • Creating and managing a pool of worker threads
    • Thread Inter-task communication
  • Working with Qt5 C++ based widget sets
    • Commonly occurring widgets - buttons, menus, dialogs, list boxes ...
    • Layout managers
    • Practical GUI programming in Qt5
  • REST and C++
    • Introduction to the REST Protocol
    • Overview of the 'Casablanca' REST C++ SDK
    • Parsing JSON documents in C++
    • Implementing Client / Server applications using the REST C++ SDK
  • Processing XML Documents in C++
    • Overview of XML, XMLS, DOM, XSLT and XPath
    • XML document parsing - SAX and DOM
    • Working with the Xerces C++ XML Parser
    • Introduction to the TinyXML and RapidXML C++ XML Parsers
    • Using libxml2 in C++ projects
  • Data Persistence
    • Serialisation - simple and complex
    • Serialisation libraries
    • Smart pointers and data persistence
    • Persistence using relational databases
    • Persistence using object relational databases
  • Network Programming
    • Object oriented perspective on TCP/IP
    • Wrapping up the Sockets API in C++
    • Building application services derived from a Socket class