\brief Re-assign a context to a PJ* object. * * This may be useful if the PJ* has been created with a context that is * thread-specific, and is later used in another thread. In that case, * the user may want to assign another thread-specific context to the * object. */
| 65 | * object. |
| 66 | */ |
| 67 | void proj_assign_context( PJ* pj, PJ_CONTEXT *ctx ) |
| 68 | { |
| 69 | if (pj==nullptr) |
| 70 | return; |
| 71 | pj->ctx = ctx; |
| 72 | if( pj->reassign_context ) |
| 73 | { |
| 74 | pj->reassign_context(pj, ctx); |
| 75 | } |
| 76 | for( const auto &alt: pj->alternativeCoordinateOperations ) |
| 77 | { |
| 78 | proj_assign_context(alt.pj, ctx); |
| 79 | } |
| 80 | |
| 81 | } |
| 82 | |
| 83 | /************************************************************************/ |
| 84 | /* createDefault() */ |
no test coverage detected