|
| 1 | +## Module name: Translation Units |
| 2 | + |
| 3 | +_Skeleton descriptions are typeset in italic text,_ |
| 4 | +_so please don't remove these descriptions when editing the topic._ |
| 5 | + |
| 6 | +### Overview |
| 7 | + |
| 8 | +_Provides a short natural language abstract of the module’s contents._ |
| 9 | +_Specifies the different levels of teaching._ |
| 10 | + |
| 11 | +------------------------------------------------------------------------ |
| 12 | +Level Objective |
| 13 | +----------------- ------------------------------------------------------ |
| 14 | +Foundational |
| 15 | + |
| 16 | +Main --- |
| 17 | + |
| 18 | +Advanced --- |
| 19 | + |
| 20 | +------------------------------------------------------------------------ |
| 21 | + |
| 22 | +### Motivation |
| 23 | + |
| 24 | +_Why is this important?_ |
| 25 | +_Why do we want to learn/teach this topic?_ |
| 26 | + |
| 27 | +### Topic introduction |
| 28 | + |
| 29 | +_Very brief introduction to the topic._ |
| 30 | + |
| 31 | +C++ Compilation model allows the developer to seperate their |
| 32 | +declarations and definitions into vrious files to build |
| 33 | +separately and potentially in parallel so as to reduce rebuild times, |
| 34 | +reduce file sizes and scopes, avoid naming collisions, and producing |
| 35 | +compiled libraries. |
| 36 | + |
| 37 | +### Foundational: Building code from multiple files |
| 38 | + |
| 39 | +#### Background/Required Knowledge |
| 40 | + |
| 41 | +A student: |
| 42 | + |
| 43 | +1. Knows how to define a variable, function, or class |
| 44 | + |
| 45 | + |
| 46 | +#### Student outcomes |
| 47 | + |
| 48 | +_A list of things "a student should be able to" after the curriculum._ |
| 49 | +_The next word should be an action word and testable in an exam._ |
| 50 | +_Max 5 items._ |
| 51 | + |
| 52 | +A student should be able to: |
| 53 | + |
| 54 | +1. create a declaration for variables, functions, and classes separate from their definitions |
| 55 | +2. compile and link code from multiple implementation files |
| 56 | +3. explain how includes work within their translation unit |
| 57 | + |
| 58 | +#### Caveats |
| 59 | + |
| 60 | +_This section mentions subtle points to understand, like anything resulting in |
| 61 | +implementation-defined, unspecified, or undefined behavior._ |
| 62 | + |
| 63 | +#### Points to cover |
| 64 | + |
| 65 | +_This section lists important details for each point._ |
| 66 | + |
| 67 | +Declarations and definitions can be within same file |
| 68 | + |
| 69 | +### Main: Organizing code across multiple translation units |
| 70 | + |
| 71 | +#### Background/Required Knowledge |
| 72 | + |
| 73 | +* All of the above. |
| 74 | + |
| 75 | +#### Student outcomes |
| 76 | + |
| 77 | +A student should be able to: |
| 78 | + |
| 79 | +1. package code into libraries |
| 80 | +2. explain trade-offs for placing code in header files vs implementation files |
| 81 | +3. |
| 82 | +4. |
| 83 | +5. |
| 84 | + |
| 85 | +#### Caveats |
| 86 | + |
| 87 | +#### Points to cover |
| 88 | + |
| 89 | +### Advanced |
| 90 | + |
| 91 | +_These are important topics that are not expected to be covered but provide |
| 92 | +guidance where one can continue to investigate this topic in more depth._ |
| 93 | + |
| 94 | +A student should be able to: |
| 95 | + |
| 96 | +1. explain how an anonymous namespace functions within their translation unit |
| 97 | +2. One-definition-rule shennanigans |
| 98 | +3. Pimpl pattern |
| 99 | +4. Template definitions in translation unit it's used in? |
| 100 | + |
0 commit comments