Difference between revisions of "Programming Templates"

From Gridkaschool
 
(7 intermediate revisions by the same user not shown)
Line 7: Line 7:
   
   
  +
[[Media:Programming Templates.pdf]]
All the single/few file examples will be compiled using the following SConscript:
 
  +
All the single/few file examples will be compiled using the following SConstruct [[Media:SConstruct]]
  +
  +
SCons is a python based building tool, started with the command "scons", when you rename it to SConstruct.
  +
----
  +
#-*- coding: utf-8 -*-
  +
  +
env = DefaultEnvironment()
  +
  +
Program ("functionTemplatesProgram1", [Glob('FunctionTemplates1.cc')] , CPPPATH=['.'], CCFLAGS = ['-std=c++11', '-ggdb'])
  +
Program ("functionTemplatesProgram2", [Glob('FunctionTemplates2.cc')] , CPPPATH=['.'], CCFLAGS = ['-std=c++11', '-ggdb'])
  +
  +
Program ("practiceSimpleTemplateProgram", [Glob('practiceSimpleTemplate.cc')] , CPPPATH=['.'], CCFLAGS = ['-std=c++11', '-ggdb'])
  +
Program ("specialisationProgram", [Glob('specialisation.cc')] , CPPPATH=['.'], CCFLAGS = ['-std=c++11', '-ggdb'])
  +
  +
Program ("genericProgrammingTricks", [Glob('genericProgrammingTricks.cc')] , CPPPATH=['.'], CCFLAGS = ['-std=c++11', '-ggdb'])
  +
#Program ("templatePitFalls", [Glob('templatePitFalls.cc')] , CPPPATH=['.'], CCFLAGS = ['-std=c++11', '-ggdb'])
  +
   
SCons is a python based building tool, started with the command "scons".
 
 
----
 
----
 
'''Reminder on template usage'''
 
'''Reminder on template usage'''
Line 21: Line 37:
 
* Code Example Template PitFall: [[Media:templatePitFalls.cc]]
 
* Code Example Template PitFall: [[Media:templatePitFalls.cc]]
 
* Exercise: [[Media:PracticePolicyProject.tgz]] [[Media:Solution.tgz]] - be careful, unpacks into same folder
 
* Exercise: [[Media:PracticePolicyProject.tgz]] [[Media:Solution.tgz]] - be careful, unpacks into same folder
  +
* Code Example Generic Programming Tricks: [[Media:GenericProgrammingTricks.cc]]

Latest revision as of 12:58, 8 September 2015

Description This workshop will contain the following topics (all topics consist of both, lecture style talk and practical programming):

  • Reminder on template usage
  • Policies


Media:Programming Templates.pdf All the single/few file examples will be compiled using the following SConstruct Media:SConstruct

SCons is a python based building tool, started with the command "scons", when you rename it to SConstruct.


  1. -*- coding: utf-8 -*-

env = DefaultEnvironment()

Program ("functionTemplatesProgram1", [Glob('FunctionTemplates1.cc')] , CPPPATH=['.'], CCFLAGS = ['-std=c++11', '-ggdb']) Program ("functionTemplatesProgram2", [Glob('FunctionTemplates2.cc')] , CPPPATH=['.'], CCFLAGS = ['-std=c++11', '-ggdb'])

Program ("practiceSimpleTemplateProgram", [Glob('practiceSimpleTemplate.cc')] , CPPPATH=['.'], CCFLAGS = ['-std=c++11', '-ggdb']) Program ("specialisationProgram", [Glob('specialisation.cc')] , CPPPATH=['.'], CCFLAGS = ['-std=c++11', '-ggdb'])

Program ("genericProgrammingTricks", [Glob('genericProgrammingTricks.cc')] , CPPPATH=['.'], CCFLAGS = ['-std=c++11', '-ggdb'])

  1. Program ("templatePitFalls", [Glob('templatePitFalls.cc')] , CPPPATH=['.'], CCFLAGS = ['-std=c++11', '-ggdb'])



Reminder on template usage


Policies