├── .appveyor.yml ├── .github ├── FUNDING.yml └── workflows │ ├── ci-mac.yaml │ └── ci-win.yaml ├── .gitignore ├── .gitmodules ├── .travis.yml ├── Build └── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE ├── PIMPL.sln ├── PIMPL.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── PIMPL.xcscmblueprint └── xcshareddata │ └── xcschemes │ └── PIMPL-Tests.xcscheme ├── PIMPL └── include │ └── XS │ └── PIMPL │ ├── Object-IMPL.hpp │ └── Object.hpp ├── README.md ├── Scripts ├── .gitignore └── travis-after.sh ├── Unit-Tests ├── Bar.cpp ├── Bar.hpp ├── Foo.cpp ├── Foo.hpp ├── Foobar.cpp ├── Foobar.hpp ├── Info.plist └── XS-PIMPL-Object.cpp └── VisualStudio └── PIMPLTests.vcxproj /.appveyor.yml: -------------------------------------------------------------------------------- 1 | image: 2 | - Visual Studio 2019 3 | platform: 4 | - x86 5 | - x64 6 | configuration: 7 | - Debug 8 | - Release 9 | install: 10 | - git submodule update --init --recursive 11 | build: 12 | project: PIMPL.sln 13 | before_build: 14 | - nuget restore 15 | for: 16 | - 17 | matrix: 18 | only: 19 | - platform: x86 20 | test_script: 21 | - '%APPVEYOR_BUILD_FOLDER%\Build\32\%CONFIGURATION%\PIMPLTests.exe' 22 | - 23 | matrix: 24 | only: 25 | - platform: x64 26 | test_script: 27 | - '%APPVEYOR_BUILD_FOLDER%\Build\64\%CONFIGURATION%\PIMPLTests.exe' 28 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: macmade 2 | -------------------------------------------------------------------------------- /.github/workflows/ci-mac.yaml: -------------------------------------------------------------------------------- 1 | name: ci-mac 2 | on: [push] 3 | jobs: 4 | ci: 5 | runs-on: macos-latest 6 | strategy: 7 | matrix: 8 | run-config: 9 | - { scheme: 'PIMPL-Tests', configuration: 'Debug', project: 'PIMPL.xcodeproj', build: 0, analyze: 0, test: 1, info: 1, destination: 'platform=macOS' } 10 | steps: 11 | 12 | - uses: actions/checkout@v1 13 | with: 14 | submodules: 'recursive' 15 | 16 | - uses: macmade/action-xcodebuild@v1.0.0 17 | 18 | - uses: macmade/action-slack@v1.0.0 19 | if: ${{ always() }} 20 | env: 21 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 22 | with: 23 | channel: '#ci' 24 | status: ${{ job.status }} 25 | title: ${{ matrix.run-config[ 'scheme' ] }} - ${{ matrix.run-config[ 'configuration' ] }} 26 | -------------------------------------------------------------------------------- /.github/workflows/ci-win.yaml: -------------------------------------------------------------------------------- 1 | name: ci-win 2 | on: [push] 3 | jobs: 4 | ci: 5 | runs-on: windows-2022 6 | strategy: 7 | matrix: 8 | run-config: 9 | - { platform: 'x64', toolset: 'x64', configuration: 'Debug', solution: 'PIMPL.sln' } 10 | - { platform: 'x64', toolset: 'x64', configuration: 'Release', solution: 'PIMPL.sln' } 11 | - { platform: 'x86', toolset: 'x64', configuration: 'Debug', solution: 'PIMPL.sln' } 12 | - { platform: 'x86', toolset: 'x64', configuration: 'Release', solution: 'PIMPL.sln' } 13 | steps: 14 | 15 | - uses: actions/checkout@v1 16 | with: 17 | submodules: 'recursive' 18 | 19 | - uses: macmade/action-msbuild@v1.1.0 20 | 21 | - uses: macmade/action-slack@v1.0.0 22 | if: ${{ always() }} 23 | env: 24 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 25 | with: 26 | channel: '#ci' 27 | status: ${{ job.status }} 28 | title: ${{ matrix.run-config[ 'solution' ] }} - ${{ matrix.run-config[ 'configuration' ] }} - ${{ matrix.run-config[ 'platform' ] }} 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac Finder 2 | .DS_Store 3 | .Trashes 4 | Icon? 5 | 6 | # Thumbnails 7 | ._* 8 | 9 | # Files that might appear on external disk 10 | .Spotlight-V100 11 | .Trashes 12 | 13 | # Windows 14 | Thumbs.db 15 | 16 | # Xcode 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | *.xccheckout 22 | *.profraw 23 | !default.pbxuser 24 | !default.mode1v3 25 | !default.mode2v3 26 | !default.perspectivev3 27 | xcuserdata 28 | 29 | # VisualStudio 30 | *.suo 31 | *.sdf 32 | *.opensdf 33 | *.vcxproj.user 34 | *.csproj.user 35 | ipch 36 | .vs 37 | *.VC.db 38 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Submodules/xcconfig"] 2 | path = Submodules/xcconfig 3 | url = https://github.com/macmade/xcconfig.git 4 | [submodule "Submodules/XSTest"] 5 | path = Submodules/XSTest 6 | url = https://github.com/macmade/XSTest.git 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode10.2 3 | cache: 4 | directories: 5 | - $HOME/.ccache 6 | install: 7 | - gem install xcpretty 8 | - brew install ccache 9 | - PATH=$PATH:/usr/local/opt/ccache/libexec 10 | - brew install --HEAD macmade/tap/xcode-coveralls 11 | - export PYTHONUSERBASE=~/.local 12 | script: 13 | - set -o pipefail && xcodebuild -project "PIMPL.xcodeproj" -scheme "PIMPL-Tests" test | xcpretty 14 | before_script: 15 | - ccache -s 16 | - ccache -z 17 | after_script: 18 | - ccache -s 19 | after_success: 20 | - bash Scripts/travis-after.sh 21 | notifications: 22 | slack: xs-labs:FXh1yLXNkpcVxKZhZU6icdhI 23 | -------------------------------------------------------------------------------- /Build/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | xs-labs.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Jean-David Gadina - www.xs-labs.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /PIMPL.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27004.2002 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PIMPLTests", "VisualStudio\PIMPLTests.vcxproj", "{81B9E1F2-2B91-483B-B0DF-5C3255A44278}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {81B9E1F2-2B91-483B-B0DF-5C3255A44278}.Debug|x64.ActiveCfg = Debug|x64 17 | {81B9E1F2-2B91-483B-B0DF-5C3255A44278}.Debug|x64.Build.0 = Debug|x64 18 | {81B9E1F2-2B91-483B-B0DF-5C3255A44278}.Debug|x86.ActiveCfg = Debug|Win32 19 | {81B9E1F2-2B91-483B-B0DF-5C3255A44278}.Debug|x86.Build.0 = Debug|Win32 20 | {81B9E1F2-2B91-483B-B0DF-5C3255A44278}.Release|x64.ActiveCfg = Release|x64 21 | {81B9E1F2-2B91-483B-B0DF-5C3255A44278}.Release|x64.Build.0 = Release|x64 22 | {81B9E1F2-2B91-483B-B0DF-5C3255A44278}.Release|x86.ActiveCfg = Release|Win32 23 | {81B9E1F2-2B91-483B-B0DF-5C3255A44278}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {B5E75124-7872-49A9-A21F-03163D50B2CB} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /PIMPL.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 050B83D91EB9151B0090EA12 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 050B83D81EB9151B0090EA12 /* libc++.tbd */; }; 11 | 0536389921B09FD50015CFA9 /* XSTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0536389621B09FC70015CFA9 /* XSTest.framework */; }; 12 | 053BEDB41B8EFDD7007D82A4 /* XS-PIMPL-Object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 053BEDA61B8EFCB6007D82A4 /* XS-PIMPL-Object.cpp */; }; 13 | 053BEE241B935C8D007D82A4 /* Bar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 053BEE221B935C8D007D82A4 /* Bar.cpp */; }; 14 | 053BEE271B935C98007D82A4 /* Foobar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 053BEE251B935C98007D82A4 /* Foobar.cpp */; }; 15 | 053BEE2A1B935CC4007D82A4 /* Foo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 053BEE281B935CC4007D82A4 /* Foo.cpp */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXContainerItemProxy section */ 19 | 0536389521B09FC70015CFA9 /* PBXContainerItemProxy */ = { 20 | isa = PBXContainerItemProxy; 21 | containerPortal = 0536389121B09FC70015CFA9 /* XSTest.xcodeproj */; 22 | proxyType = 2; 23 | remoteGlobalIDString = 05D526E721A864BC0025CCEB; 24 | remoteInfo = XSTest; 25 | }; 26 | 0536389721B09FD10015CFA9 /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = 0536389121B09FC70015CFA9 /* XSTest.xcodeproj */; 29 | proxyType = 1; 30 | remoteGlobalIDString = 05D526E621A864BC0025CCEB; 31 | remoteInfo = XSTest; 32 | }; 33 | /* End PBXContainerItemProxy section */ 34 | 35 | /* Begin PBXFileReference section */ 36 | 050B83D81EB9151B0090EA12 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; 37 | 0536389121B09FC70015CFA9 /* XSTest.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = XSTest.xcodeproj; path = Submodules/XSTest/XSTest.xcodeproj; sourceTree = ""; }; 38 | 053BEDA31B8EFCB6007D82A4 /* Object-IMPL.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "Object-IMPL.hpp"; sourceTree = ""; }; 39 | 053BEDA41B8EFCB6007D82A4 /* Object.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Object.hpp; sourceTree = ""; }; 40 | 053BEDA61B8EFCB6007D82A4 /* XS-PIMPL-Object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "XS-PIMPL-Object.cpp"; sourceTree = ""; }; 41 | 053BEDAC1B8EFDC1007D82A4 /* PIMPL-Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "PIMPL-Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 053BEDC71B8EFE1E007D82A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | 053BEDE71B90ABB2007D82A4 /* travis-after.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "travis-after.sh"; sourceTree = ""; }; 44 | 053BEE221B935C8D007D82A4 /* Bar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Bar.cpp; sourceTree = ""; }; 45 | 053BEE231B935C8D007D82A4 /* Bar.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Bar.hpp; sourceTree = ""; }; 46 | 053BEE251B935C98007D82A4 /* Foobar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Foobar.cpp; sourceTree = ""; }; 47 | 053BEE261B935C98007D82A4 /* Foobar.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Foobar.hpp; sourceTree = ""; }; 48 | 053BEE281B935CC4007D82A4 /* Foo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Foo.cpp; sourceTree = ""; }; 49 | 053BEE291B935CC4007D82A4 /* Foo.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Foo.hpp; sourceTree = ""; }; 50 | 0572247C20112CB300DC0502 /* Release - ccache.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Release - ccache.xcconfig"; sourceTree = ""; }; 51 | 0572247D20112CB300DC0502 /* Common.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Common.xcconfig; sourceTree = ""; }; 52 | 0572247E20112CB300DC0502 /* Debug - ccache.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Debug - ccache.xcconfig"; sourceTree = ""; }; 53 | 0572247F20112CB300DC0502 /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; 54 | 0572248020112CB300DC0502 /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; 55 | 0572248120112CB300DC0502 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 56 | 0572248320112CB300DC0502 /* Signing.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Signing.xcconfig; sourceTree = ""; }; 57 | 0572248420112CB300DC0502 /* Architectures.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Architectures.xcconfig; sourceTree = ""; }; 58 | 0572248620112CB300DC0502 /* Issues.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Issues.xcconfig; sourceTree = ""; }; 59 | 0572248820112CB300DC0502 /* Apple-APIs.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apple-APIs.xcconfig"; sourceTree = ""; }; 60 | 0572248920112CB300DC0502 /* Generic-Issues.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Generic-Issues.xcconfig"; sourceTree = ""; }; 61 | 0572248A20112CB300DC0502 /* Security.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Security.xcconfig; sourceTree = ""; }; 62 | 0572248B20112CB300DC0502 /* Objective-C.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Objective-C.xcconfig"; sourceTree = ""; }; 63 | 0572248C20112CB300DC0502 /* Analysis-Policy.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Analysis-Policy.xcconfig"; sourceTree = ""; }; 64 | 0572248D20112CB300DC0502 /* Deployment.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Deployment.xcconfig; sourceTree = ""; }; 65 | 0572248E20112CB300DC0502 /* Build-Options.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Build-Options.xcconfig"; sourceTree = ""; }; 66 | 0572248F20112CB300DC0502 /* Swift-Compiler.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Swift-Compiler.xcconfig"; sourceTree = ""; }; 67 | 0572249020112CB300DC0502 /* Static-Analyzer.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Static-Analyzer.xcconfig"; sourceTree = ""; }; 68 | 0572249220112CB300DC0502 /* Warnings-Policies.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Warnings-Policies.xcconfig"; sourceTree = ""; }; 69 | 0572249320112CB300DC0502 /* Code-Generation.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Code-Generation.xcconfig"; sourceTree = ""; }; 70 | 0572249420112CB300DC0502 /* Language.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Language.xcconfig; sourceTree = ""; }; 71 | 0572249520112CB300DC0502 /* General.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = General.xcconfig; sourceTree = ""; }; 72 | 0572249620112CB300DC0502 /* Search-Paths.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Search-Paths.xcconfig"; sourceTree = ""; }; 73 | 0572249720112CB300DC0502 /* Apple-LLVM.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apple-LLVM.xcconfig"; sourceTree = ""; }; 74 | 0572249A20112CB300DC0502 /* Modules.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Modules.xcconfig; sourceTree = ""; }; 75 | 0572249B20112CB300DC0502 /* Objective-C.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Objective-C.xcconfig"; sourceTree = ""; }; 76 | 0572249C20112CB300DC0502 /* C++.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "C++.xcconfig"; sourceTree = ""; }; 77 | 0572249D20112CB300DC0502 /* Code-Generation.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Code-Generation.xcconfig"; sourceTree = ""; }; 78 | 0572249E20112CB300DC0502 /* Address-Sanitizer.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Address-Sanitizer.xcconfig"; sourceTree = ""; }; 79 | 0572249F20112CB300DC0502 /* Language.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Language.xcconfig; sourceTree = ""; }; 80 | 057224A020112CB300DC0502 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 81 | 057224A120112CB300DC0502 /* Undefined-Behavior-Sanitizer.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Undefined-Behavior-Sanitizer.xcconfig"; sourceTree = ""; }; 82 | 057224A220112CB300DC0502 /* Warning-Policies.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Warning-Policies.xcconfig"; sourceTree = ""; }; 83 | 057224A420112CB300DC0502 /* Objective-C-ARC.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Objective-C-ARC.xcconfig"; sourceTree = ""; }; 84 | 057224A520112CB300DC0502 /* Objective-C.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Objective-C.xcconfig"; sourceTree = ""; }; 85 | 057224A620112CB300DC0502 /* C++.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "C++.xcconfig"; sourceTree = ""; }; 86 | 057224A720112CB300DC0502 /* All-Languages.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "All-Languages.xcconfig"; sourceTree = ""; }; 87 | 057224A820112CB300DC0502 /* Preprocessing.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Preprocessing.xcconfig; sourceTree = ""; }; 88 | 057224AB20112CB300DC0502 /* ccache-config.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "ccache-config.sh"; sourceTree = ""; }; 89 | 057224AC20112CB300DC0502 /* ccache.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = ccache.sh; sourceTree = ""; }; 90 | /* End PBXFileReference section */ 91 | 92 | /* Begin PBXFrameworksBuildPhase section */ 93 | 053BEDA91B8EFDC1007D82A4 /* Frameworks */ = { 94 | isa = PBXFrameworksBuildPhase; 95 | buildActionMask = 2147483647; 96 | files = ( 97 | 0536389921B09FD50015CFA9 /* XSTest.framework in Frameworks */, 98 | 050B83D91EB9151B0090EA12 /* libc++.tbd in Frameworks */, 99 | ); 100 | runOnlyForDeploymentPostprocessing = 0; 101 | }; 102 | /* End PBXFrameworksBuildPhase section */ 103 | 104 | /* Begin PBXGroup section */ 105 | 050B83D71EB9151A0090EA12 /* Frameworks */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 050B83D81EB9151B0090EA12 /* libc++.tbd */, 109 | ); 110 | name = Frameworks; 111 | sourceTree = ""; 112 | }; 113 | 0536389221B09FC70015CFA9 /* Products */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 0536389621B09FC70015CFA9 /* XSTest.framework */, 117 | ); 118 | name = Products; 119 | sourceTree = ""; 120 | }; 121 | 053BED9F1B8EFCB6007D82A4 /* PIMPL */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 053BEDA01B8EFCB6007D82A4 /* include */, 125 | ); 126 | path = PIMPL; 127 | sourceTree = ""; 128 | }; 129 | 053BEDA01B8EFCB6007D82A4 /* include */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 053BEDA11B8EFCB6007D82A4 /* XS */, 133 | ); 134 | path = include; 135 | sourceTree = ""; 136 | }; 137 | 053BEDA11B8EFCB6007D82A4 /* XS */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 053BEDA21B8EFCB6007D82A4 /* PIMPL */, 141 | ); 142 | path = XS; 143 | sourceTree = ""; 144 | }; 145 | 053BEDA21B8EFCB6007D82A4 /* PIMPL */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 053BEDA31B8EFCB6007D82A4 /* Object-IMPL.hpp */, 149 | 053BEDA41B8EFCB6007D82A4 /* Object.hpp */, 150 | ); 151 | path = PIMPL; 152 | sourceTree = ""; 153 | }; 154 | 053BEDA51B8EFCB6007D82A4 /* Unit-Tests */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | 053BEE221B935C8D007D82A4 /* Bar.cpp */, 158 | 053BEE231B935C8D007D82A4 /* Bar.hpp */, 159 | 053BEE281B935CC4007D82A4 /* Foo.cpp */, 160 | 053BEE291B935CC4007D82A4 /* Foo.hpp */, 161 | 053BEE251B935C98007D82A4 /* Foobar.cpp */, 162 | 053BEE261B935C98007D82A4 /* Foobar.hpp */, 163 | 053BEDC71B8EFE1E007D82A4 /* Info.plist */, 164 | 053BEDA61B8EFCB6007D82A4 /* XS-PIMPL-Object.cpp */, 165 | ); 166 | path = "Unit-Tests"; 167 | sourceTree = ""; 168 | }; 169 | 053BEDE51B90ABB2007D82A4 /* Scripts */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | 053BEDE71B90ABB2007D82A4 /* travis-after.sh */, 173 | ); 174 | path = Scripts; 175 | sourceTree = ""; 176 | }; 177 | 0572247B20112CB300DC0502 /* xcconfig */ = { 178 | isa = PBXGroup; 179 | children = ( 180 | 0572247C20112CB300DC0502 /* Release - ccache.xcconfig */, 181 | 0572247D20112CB300DC0502 /* Common.xcconfig */, 182 | 0572247E20112CB300DC0502 /* Debug - ccache.xcconfig */, 183 | 0572247F20112CB300DC0502 /* Debug.xcconfig */, 184 | 0572248020112CB300DC0502 /* Release.xcconfig */, 185 | 0572248120112CB300DC0502 /* README.md */, 186 | 0572248220112CB300DC0502 /* Common */, 187 | 057224AA20112CB300DC0502 /* Scripts */, 188 | ); 189 | name = xcconfig; 190 | path = Submodules/xcconfig; 191 | sourceTree = ""; 192 | }; 193 | 0572248220112CB300DC0502 /* Common */ = { 194 | isa = PBXGroup; 195 | children = ( 196 | 0572248320112CB300DC0502 /* Signing.xcconfig */, 197 | 0572248420112CB300DC0502 /* Architectures.xcconfig */, 198 | 0572248520112CB300DC0502 /* Static-Analyzer */, 199 | 0572248D20112CB300DC0502 /* Deployment.xcconfig */, 200 | 0572248E20112CB300DC0502 /* Build-Options.xcconfig */, 201 | 0572248F20112CB300DC0502 /* Swift-Compiler.xcconfig */, 202 | 0572249020112CB300DC0502 /* Static-Analyzer.xcconfig */, 203 | 0572249120112CB300DC0502 /* Swift-Compiler */, 204 | 0572249620112CB300DC0502 /* Search-Paths.xcconfig */, 205 | 0572249720112CB300DC0502 /* Apple-LLVM.xcconfig */, 206 | 0572249820112CB300DC0502 /* Apple-LLVM */, 207 | ); 208 | path = Common; 209 | sourceTree = ""; 210 | }; 211 | 0572248520112CB300DC0502 /* Static-Analyzer */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | 0572248620112CB300DC0502 /* Issues.xcconfig */, 215 | 0572248720112CB300DC0502 /* Issues */, 216 | ); 217 | path = "Static-Analyzer"; 218 | sourceTree = ""; 219 | }; 220 | 0572248720112CB300DC0502 /* Issues */ = { 221 | isa = PBXGroup; 222 | children = ( 223 | 0572248820112CB300DC0502 /* Apple-APIs.xcconfig */, 224 | 0572248920112CB300DC0502 /* Generic-Issues.xcconfig */, 225 | 0572248A20112CB300DC0502 /* Security.xcconfig */, 226 | 0572248B20112CB300DC0502 /* Objective-C.xcconfig */, 227 | 0572248C20112CB300DC0502 /* Analysis-Policy.xcconfig */, 228 | ); 229 | path = Issues; 230 | sourceTree = ""; 231 | }; 232 | 0572249120112CB300DC0502 /* Swift-Compiler */ = { 233 | isa = PBXGroup; 234 | children = ( 235 | 0572249220112CB300DC0502 /* Warnings-Policies.xcconfig */, 236 | 0572249320112CB300DC0502 /* Code-Generation.xcconfig */, 237 | 0572249420112CB300DC0502 /* Language.xcconfig */, 238 | 0572249520112CB300DC0502 /* General.xcconfig */, 239 | ); 240 | path = "Swift-Compiler"; 241 | sourceTree = ""; 242 | }; 243 | 0572249820112CB300DC0502 /* Apple-LLVM */ = { 244 | isa = PBXGroup; 245 | children = ( 246 | 0572249920112CB300DC0502 /* Language */, 247 | 0572249D20112CB300DC0502 /* Code-Generation.xcconfig */, 248 | 0572249E20112CB300DC0502 /* Address-Sanitizer.xcconfig */, 249 | 0572249F20112CB300DC0502 /* Language.xcconfig */, 250 | 057224A020112CB300DC0502 /* Warnings.xcconfig */, 251 | 057224A120112CB300DC0502 /* Undefined-Behavior-Sanitizer.xcconfig */, 252 | 057224A220112CB300DC0502 /* Warning-Policies.xcconfig */, 253 | 057224A320112CB300DC0502 /* Warnings */, 254 | 057224A820112CB300DC0502 /* Preprocessing.xcconfig */, 255 | ); 256 | path = "Apple-LLVM"; 257 | sourceTree = ""; 258 | }; 259 | 0572249920112CB300DC0502 /* Language */ = { 260 | isa = PBXGroup; 261 | children = ( 262 | 0572249A20112CB300DC0502 /* Modules.xcconfig */, 263 | 0572249B20112CB300DC0502 /* Objective-C.xcconfig */, 264 | 0572249C20112CB300DC0502 /* C++.xcconfig */, 265 | ); 266 | path = Language; 267 | sourceTree = ""; 268 | }; 269 | 057224A320112CB300DC0502 /* Warnings */ = { 270 | isa = PBXGroup; 271 | children = ( 272 | 057224A420112CB300DC0502 /* Objective-C-ARC.xcconfig */, 273 | 057224A520112CB300DC0502 /* Objective-C.xcconfig */, 274 | 057224A620112CB300DC0502 /* C++.xcconfig */, 275 | 057224A720112CB300DC0502 /* All-Languages.xcconfig */, 276 | ); 277 | path = Warnings; 278 | sourceTree = ""; 279 | }; 280 | 057224AA20112CB300DC0502 /* Scripts */ = { 281 | isa = PBXGroup; 282 | children = ( 283 | 057224AB20112CB300DC0502 /* ccache-config.sh */, 284 | 057224AC20112CB300DC0502 /* ccache.sh */, 285 | ); 286 | path = Scripts; 287 | sourceTree = ""; 288 | }; 289 | 05BD89491A13FF4700A43CD8 = { 290 | isa = PBXGroup; 291 | children = ( 292 | 0536389121B09FC70015CFA9 /* XSTest.xcodeproj */, 293 | 0572247B20112CB300DC0502 /* xcconfig */, 294 | 053BED9F1B8EFCB6007D82A4 /* PIMPL */, 295 | 053BEDA51B8EFCB6007D82A4 /* Unit-Tests */, 296 | 053BEDE51B90ABB2007D82A4 /* Scripts */, 297 | 05BD89531A13FF4700A43CD8 /* Products */, 298 | 050B83D71EB9151A0090EA12 /* Frameworks */, 299 | ); 300 | sourceTree = ""; 301 | }; 302 | 05BD89531A13FF4700A43CD8 /* Products */ = { 303 | isa = PBXGroup; 304 | children = ( 305 | 053BEDAC1B8EFDC1007D82A4 /* PIMPL-Tests.xctest */, 306 | ); 307 | name = Products; 308 | sourceTree = ""; 309 | }; 310 | /* End PBXGroup section */ 311 | 312 | /* Begin PBXNativeTarget section */ 313 | 053BEDAB1B8EFDC1007D82A4 /* PIMPL-Tests */ = { 314 | isa = PBXNativeTarget; 315 | buildConfigurationList = 053BEDB11B8EFDC1007D82A4 /* Build configuration list for PBXNativeTarget "PIMPL-Tests" */; 316 | buildPhases = ( 317 | 053BEDA81B8EFDC1007D82A4 /* Sources */, 318 | 053BEDA91B8EFDC1007D82A4 /* Frameworks */, 319 | 053BEDAA1B8EFDC1007D82A4 /* Resources */, 320 | 053BEDF51B90AC06007D82A4 /* ShellScript */, 321 | ); 322 | buildRules = ( 323 | ); 324 | dependencies = ( 325 | 0536389821B09FD10015CFA9 /* PBXTargetDependency */, 326 | ); 327 | name = "PIMPL-Tests"; 328 | productName = "PIMPL-Tests"; 329 | productReference = 053BEDAC1B8EFDC1007D82A4 /* PIMPL-Tests.xctest */; 330 | productType = "com.apple.product-type.bundle.unit-test"; 331 | }; 332 | /* End PBXNativeTarget section */ 333 | 334 | /* Begin PBXProject section */ 335 | 05BD894A1A13FF4700A43CD8 /* Project object */ = { 336 | isa = PBXProject; 337 | attributes = { 338 | LastUpgradeCheck = 1530; 339 | ORGANIZATIONNAME = "XS-Labs"; 340 | TargetAttributes = { 341 | 053BEDAB1B8EFDC1007D82A4 = { 342 | CreatedOnToolsVersion = 7.0; 343 | DevelopmentTeam = 326Y53CJMD; 344 | ProvisioningStyle = Automatic; 345 | }; 346 | }; 347 | }; 348 | buildConfigurationList = 05BD894D1A13FF4700A43CD8 /* Build configuration list for PBXProject "PIMPL" */; 349 | compatibilityVersion = "Xcode 3.2"; 350 | developmentRegion = en; 351 | hasScannedForEncodings = 0; 352 | knownRegions = ( 353 | en, 354 | Base, 355 | ); 356 | mainGroup = 05BD89491A13FF4700A43CD8; 357 | productRefGroup = 05BD89531A13FF4700A43CD8 /* Products */; 358 | projectDirPath = ""; 359 | projectReferences = ( 360 | { 361 | ProductGroup = 0536389221B09FC70015CFA9 /* Products */; 362 | ProjectRef = 0536389121B09FC70015CFA9 /* XSTest.xcodeproj */; 363 | }, 364 | ); 365 | projectRoot = ""; 366 | targets = ( 367 | 053BEDAB1B8EFDC1007D82A4 /* PIMPL-Tests */, 368 | ); 369 | }; 370 | /* End PBXProject section */ 371 | 372 | /* Begin PBXReferenceProxy section */ 373 | 0536389621B09FC70015CFA9 /* XSTest.framework */ = { 374 | isa = PBXReferenceProxy; 375 | fileType = wrapper.framework; 376 | path = XSTest.framework; 377 | remoteRef = 0536389521B09FC70015CFA9 /* PBXContainerItemProxy */; 378 | sourceTree = BUILT_PRODUCTS_DIR; 379 | }; 380 | /* End PBXReferenceProxy section */ 381 | 382 | /* Begin PBXResourcesBuildPhase section */ 383 | 053BEDAA1B8EFDC1007D82A4 /* Resources */ = { 384 | isa = PBXResourcesBuildPhase; 385 | buildActionMask = 2147483647; 386 | files = ( 387 | ); 388 | runOnlyForDeploymentPostprocessing = 0; 389 | }; 390 | /* End PBXResourcesBuildPhase section */ 391 | 392 | /* Begin PBXShellScriptBuildPhase section */ 393 | 053BEDF51B90AC06007D82A4 /* ShellScript */ = { 394 | isa = PBXShellScriptBuildPhase; 395 | alwaysOutOfDate = 1; 396 | buildActionMask = 2147483647; 397 | files = ( 398 | ); 399 | inputPaths = ( 400 | ); 401 | outputPaths = ( 402 | ); 403 | runOnlyForDeploymentPostprocessing = 0; 404 | shellPath = /bin/sh; 405 | shellScript = "export | egrep '(BUILT_PRODUCTS_DIR)|(CURRENT_ARCH)|(OBJECT_FILE_DIR_normal)|(SRCROOT)|(OBJROOT)' > Scripts/xcenv-tests.sh\n"; 406 | }; 407 | /* End PBXShellScriptBuildPhase section */ 408 | 409 | /* Begin PBXSourcesBuildPhase section */ 410 | 053BEDA81B8EFDC1007D82A4 /* Sources */ = { 411 | isa = PBXSourcesBuildPhase; 412 | buildActionMask = 2147483647; 413 | files = ( 414 | 053BEE2A1B935CC4007D82A4 /* Foo.cpp in Sources */, 415 | 053BEE241B935C8D007D82A4 /* Bar.cpp in Sources */, 416 | 053BEE271B935C98007D82A4 /* Foobar.cpp in Sources */, 417 | 053BEDB41B8EFDD7007D82A4 /* XS-PIMPL-Object.cpp in Sources */, 418 | ); 419 | runOnlyForDeploymentPostprocessing = 0; 420 | }; 421 | /* End PBXSourcesBuildPhase section */ 422 | 423 | /* Begin PBXTargetDependency section */ 424 | 0536389821B09FD10015CFA9 /* PBXTargetDependency */ = { 425 | isa = PBXTargetDependency; 426 | name = XSTest; 427 | targetProxy = 0536389721B09FD10015CFA9 /* PBXContainerItemProxy */; 428 | }; 429 | /* End PBXTargetDependency section */ 430 | 431 | /* Begin XCBuildConfiguration section */ 432 | 053BEDB21B8EFDC1007D82A4 /* Debug */ = { 433 | isa = XCBuildConfiguration; 434 | buildSettings = { 435 | HEADER_SEARCH_PATHS = ( 436 | PIMPL/include/, 437 | Submodules/SeriousCode/, 438 | ); 439 | INFOPLIST_FILE = "Unit-Tests/Info.plist"; 440 | LD_RUNPATH_SEARCH_PATHS = ( 441 | "$(inherited)", 442 | "@executable_path/../Frameworks", 443 | "@loader_path/../Frameworks", 444 | ); 445 | PRODUCT_BUNDLE_IDENTIFIER = "com.xs-labs.PIMPL-Tests"; 446 | PRODUCT_NAME = "$(TARGET_NAME)"; 447 | }; 448 | name = Debug; 449 | }; 450 | 053BEDB31B8EFDC1007D82A4 /* Release */ = { 451 | isa = XCBuildConfiguration; 452 | buildSettings = { 453 | HEADER_SEARCH_PATHS = ( 454 | PIMPL/include/, 455 | Submodules/SeriousCode/, 456 | ); 457 | INFOPLIST_FILE = "Unit-Tests/Info.plist"; 458 | LD_RUNPATH_SEARCH_PATHS = ( 459 | "$(inherited)", 460 | "@executable_path/../Frameworks", 461 | "@loader_path/../Frameworks", 462 | ); 463 | PRODUCT_BUNDLE_IDENTIFIER = "com.xs-labs.PIMPL-Tests"; 464 | PRODUCT_NAME = "$(TARGET_NAME)"; 465 | }; 466 | name = Release; 467 | }; 468 | 05BD89571A13FF4700A43CD8 /* Debug */ = { 469 | isa = XCBuildConfiguration; 470 | baseConfigurationReference = 0572247E20112CB300DC0502 /* Debug - ccache.xcconfig */; 471 | buildSettings = { 472 | MACOSX_DEPLOYMENT_TARGET = 10.10; 473 | }; 474 | name = Debug; 475 | }; 476 | 05BD89581A13FF4700A43CD8 /* Release */ = { 477 | isa = XCBuildConfiguration; 478 | baseConfigurationReference = 0572247C20112CB300DC0502 /* Release - ccache.xcconfig */; 479 | buildSettings = { 480 | MACOSX_DEPLOYMENT_TARGET = 10.10; 481 | }; 482 | name = Release; 483 | }; 484 | /* End XCBuildConfiguration section */ 485 | 486 | /* Begin XCConfigurationList section */ 487 | 053BEDB11B8EFDC1007D82A4 /* Build configuration list for PBXNativeTarget "PIMPL-Tests" */ = { 488 | isa = XCConfigurationList; 489 | buildConfigurations = ( 490 | 053BEDB21B8EFDC1007D82A4 /* Debug */, 491 | 053BEDB31B8EFDC1007D82A4 /* Release */, 492 | ); 493 | defaultConfigurationIsVisible = 0; 494 | defaultConfigurationName = Release; 495 | }; 496 | 05BD894D1A13FF4700A43CD8 /* Build configuration list for PBXProject "PIMPL" */ = { 497 | isa = XCConfigurationList; 498 | buildConfigurations = ( 499 | 05BD89571A13FF4700A43CD8 /* Debug */, 500 | 05BD89581A13FF4700A43CD8 /* Release */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | /* End XCConfigurationList section */ 506 | }; 507 | rootObject = 05BD894A1A13FF4700A43CD8 /* Project object */; 508 | } 509 | -------------------------------------------------------------------------------- /PIMPL.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PIMPL.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PIMPL.xcodeproj/project.xcworkspace/xcshareddata/PIMPL.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "DC27B5DA8A3BAEC9EFF8F0DE9ED4ADFB1116243D", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "A59B79241FF48B87B8A2D6239F13C873F14163E3" : 0, 8 | "DC27B5DA8A3BAEC9EFF8F0DE9ED4ADFB1116243D" : 0 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "5521C9A6-96AA-455E-BEE7-6714F09EF258", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "A59B79241FF48B87B8A2D6239F13C873F14163E3" : "PIMPL\/Submodules\/gmock-xcode\/", 13 | "DC27B5DA8A3BAEC9EFF8F0DE9ED4ADFB1116243D" : "PIMPL\/" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "PIMPL", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "PIMPL.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/macmade\/gmock-xcode.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "A59B79241FF48B87B8A2D6239F13C873F14163E3" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:macmade\/PIMPL.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "DC27B5DA8A3BAEC9EFF8F0DE9ED4ADFB1116243D" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /PIMPL.xcodeproj/xcshareddata/xcschemes/PIMPL-Tests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 16 | 17 | 19 | 25 | 26 | 27 | 28 | 29 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /PIMPL/include/XS/PIMPL/Object-IMPL.hpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @copyright (c) 2015 - Jean-David Gadina - www.xs-labs.com 27 | * @brief Private delcarations of the XS::PIMPL::Object template class 28 | * 29 | * This header shall be included in implementations of PIMPL classes. 30 | * Note that explicit template instanciation is required after the declaration 31 | * of the IMPL class. 32 | */ 33 | 34 | #include 35 | #include 36 | #include 37 | 38 | #ifndef XS_PIMPL_CLASS 39 | #error "Please define XS_PIMPL_CLASS before including this header file" 40 | #endif 41 | 42 | namespace XS 43 | { 44 | namespace PIMPL 45 | { 46 | /* C++11 support is buggy on MSVC V120 toolset (see C4520)... */ 47 | #if !defined( _MSC_FULL_VER ) || _MSC_FULL_VER >= 190024215 48 | 49 | template<> 50 | Object< XS_PIMPL_CLASS >::Object( void ): impl( new Object< XS_PIMPL_CLASS >::IMPL() ) 51 | {} 52 | 53 | template<> 54 | template< typename ... A > 55 | Object< XS_PIMPL_CLASS >::Object( A & ... a ): impl( new Object< XS_PIMPL_CLASS >::IMPL( a ... ) ) 56 | {} 57 | 58 | template<> 59 | template< typename ... A > 60 | Object< XS_PIMPL_CLASS >::Object( const A & ... a ): impl( new Object< XS_PIMPL_CLASS >::IMPL( a ... ) ) 61 | {} 62 | 63 | #else 64 | 65 | template<> 66 | Object< XS_PIMPL_CLASS >::Object( void ): impl( new Object< XS_PIMPL_CLASS >::IMPL ) 67 | {} 68 | 69 | template<> 70 | template< typename A1, typename ... A2 > 71 | Object< XS_PIMPL_CLASS >::Object( A1 a1, A2 ... a2 ): impl( new Object< XS_PIMPL_CLASS >::IMPL( a1, a2 ... ) ) 72 | {} 73 | 74 | #endif 75 | 76 | template<> 77 | Object< XS_PIMPL_CLASS >::Object( const Object< XS_PIMPL_CLASS > & o ): impl( new Object< XS_PIMPL_CLASS >::IMPL( *( o.impl ) ) ) 78 | {} 79 | 80 | template<> 81 | Object< XS_PIMPL_CLASS >::Object( Object< XS_PIMPL_CLASS > && o ): impl( std::move( o.impl ) ) 82 | { 83 | o.impl = nullptr; 84 | } 85 | 86 | template<> 87 | Object< XS_PIMPL_CLASS >::~Object( void ) 88 | { 89 | delete this->impl; 90 | } 91 | 92 | template<> 93 | Object< XS_PIMPL_CLASS > & Object< XS_PIMPL_CLASS >::operator =( Object< XS_PIMPL_CLASS > o ) 94 | { 95 | swap( *( this ), o ); 96 | 97 | return *( this ); 98 | } 99 | 100 | template< class U > 101 | void swap( Object< U > & o1, Object< U > & o2 ) 102 | { 103 | using std::swap; 104 | 105 | swap( o1.impl, o2.impl ); 106 | } 107 | } 108 | } 109 | 110 | /* Explicit template instantiation */ 111 | template class XS::PIMPL::Object< XS_PIMPL_CLASS >; 112 | template void XS::PIMPL::swap< XS_PIMPL_CLASS >( XS::PIMPL::Object< XS_PIMPL_CLASS > & o1, XS::PIMPL::Object< XS_PIMPL_CLASS > & o2 ); 113 | -------------------------------------------------------------------------------- /PIMPL/include/XS/PIMPL/Object.hpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @copyright (c) 2015 - Jean-David Gadina - www.xs-labs.com 27 | * @brief Declaration of the XS::PIMPL::Object template class 28 | */ 29 | 30 | #ifndef XS_PIMPL_OBJECT_H 31 | #define XS_PIMPL_OBJECT_H 32 | 33 | #ifdef _WIN32 34 | #ifdef XS_PIMPL_EXPORTS 35 | #define XS_PIMPL_API __declspec( dllexport ) 36 | #else 37 | #define XS_PIMPL_API __declspec( dllimport ) 38 | #endif 39 | #else 40 | #define XS_PIMPL_API 41 | #endif 42 | 43 | namespace XS 44 | { 45 | namespace PIMPL 46 | { 47 | /*! 48 | * @brief Generic PIMPL class 49 | * @tparam T The class extending XS::PIMPL::Object 50 | */ 51 | template< class T > 52 | class XS_PIMPL_API Object 53 | { 54 | public: 55 | 56 | /* C++11 support is buggy on MSVC V120 toolset (see C4520)... */ 57 | #if !defined( _MSC_FULL_VER ) || _MSC_FULL_VER >= 190024215 58 | 59 | /*! 60 | * @brief Class constructor (without parameters) 61 | */ 62 | Object( void ); 63 | 64 | /*! 65 | * @brief Class constructor (with optional parameters) 66 | */ 67 | template< typename ... A > 68 | Object( A & ... a ); 69 | 70 | /*! 71 | * @brief Class constructor (with optional const parameters) 72 | */ 73 | template< typename ... A > 74 | Object( const A & ... a ); 75 | 76 | #else 77 | 78 | /*! 79 | * @brief Class constructor (no parameters) 80 | */ 81 | Object( void ); 82 | 83 | /*! 84 | * @brief Class constructor (with parameters) 85 | */ 86 | template< typename A1, typename ... A2 > 87 | Object( A1 a1, A2 ... a2 ); 88 | 89 | #endif 90 | 91 | /*! 92 | * @brief Class copy constructor 93 | * @param o Another object to be used as data source for the initialization 94 | */ 95 | Object( const Object< T > & o ); 96 | 97 | /*! 98 | * @brief Class move constructor 99 | * @param o Another object to be used as data source for the initialization 100 | */ 101 | Object( Object< T > && o ); 102 | 103 | /*! 104 | * @brief Class destructor 105 | */ 106 | virtual ~Object( void ); 107 | 108 | /*! 109 | * @brief Assignment operator 110 | * @param o Another object to use as data source 111 | */ 112 | Object< T > & operator =( Object< T > o ); 113 | 114 | /*! 115 | * @brief ADL - Swap function for XS::PIMPL::Object 116 | * @param o1 The first object to swap 117 | * @param o2 The second object to swap 118 | */ 119 | template< class U > 120 | friend void swap( Object< U > & o1, Object< U > & o2 ); 121 | 122 | private: 123 | 124 | friend T; 125 | class IMPL; 126 | 127 | /*! 128 | * @brief A pointer to the class' private implementation 129 | */ 130 | IMPL * impl; 131 | }; 132 | } 133 | } 134 | 135 | #endif /* XS_PIMPL_OBJECT_H */ 136 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | PIMPL 2 | ===== 3 | 4 | [![Build Status](https://img.shields.io/github/actions/workflow/status/macmade/PIMPL/ci-mac.yaml?label=macOS&logo=apple)](https://github.com/macmade/PIMPL/actions/workflows/ci-mac.yaml) 5 | [![Build Status](https://img.shields.io/github/actions/workflow/status/macmade/PIMPL/ci-win.yaml?label=Windows&logo=windows)](https://github.com/macmade/PIMPL/actions/workflows/ci-win.yaml) 6 | [![Issues](http://img.shields.io/github/issues/macmade/PIMPL.svg?logo=github)](https://github.com/macmade/PIMPL/issues) 7 | ![Status](https://img.shields.io/badge/status-active-brightgreen.svg?logo=git) 8 | ![License](https://img.shields.io/badge/license-mit-brightgreen.svg?logo=open-source-initiative) 9 | [![Contact](https://img.shields.io/badge/follow-@macmade-blue.svg?logo=twitter&style=social)](https://twitter.com/macmade) 10 | [![Sponsor](https://img.shields.io/badge/sponsor-macmade-pink.svg?logo=github-sponsors&style=social)](https://github.com/sponsors/macmade) 11 | 12 | About 13 | ----- 14 | 15 | Generic C++11 PIMPL implementation. 16 | 17 | License 18 | ------- 19 | 20 | PIMPL is released under the terms of the MIT License. 21 | 22 | Repository Infos 23 | ---------------- 24 | 25 | Owner: Jean-David Gadina - XS-Labs 26 | Web: www.xs-labs.com 27 | Blog: www.noxeos.com 28 | Twitter: @macmade 29 | GitHub: github.com/macmade 30 | LinkedIn: ch.linkedin.com/in/macmade/ 31 | StackOverflow: stackoverflow.com/users/182676/macmade 32 | -------------------------------------------------------------------------------- /Scripts/.gitignore: -------------------------------------------------------------------------------- 1 | xcenv-lib.sh 2 | xcenv-tests.sh 3 | -------------------------------------------------------------------------------- /Scripts/travis-after.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Reports code coverage to coveralls.io 4 | source Scripts/xcenv-tests.sh 5 | declare -r DIR_BUILD_TESTS="${OBJECT_FILE_DIR_normal}/${CURRENT_ARCH}/" 6 | xcode-coveralls --include PIMPL --project PIMPL.xcodeproj "${DIR_BUILD_TESTS}" 7 | -------------------------------------------------------------------------------- /Unit-Tests/Bar.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @copyright (c) 2015 - Jean-David Gadina - www.xs-labs.com 27 | * @brief Test class Bar 28 | */ 29 | 30 | #include "Bar.hpp" 31 | 32 | template<> 33 | class XS::PIMPL::Object< Bar >::IMPL 34 | { 35 | public: 36 | 37 | IMPL( void ): _z( 0 ) 38 | {} 39 | 40 | IMPL( int z ): _z( z ) 41 | {} 42 | 43 | IMPL( const IMPL & o ): _z( o._z ) 44 | {} 45 | 46 | ~IMPL( void ) 47 | {} 48 | 49 | int _z; 50 | }; 51 | 52 | #define XS_PIMPL_CLASS Bar 53 | #include 54 | 55 | Bar::Bar( void ): Foo( 0, 0 ), XS::PIMPL::Object< Bar >( 0 ) 56 | {} 57 | 58 | Bar::Bar( int x, int y, int z ): Foo( x, y ), XS::PIMPL::Object< Bar >( z ) 59 | {} 60 | 61 | int Bar::GetZ( void ) 62 | { 63 | return this->impl->_z; 64 | } 65 | 66 | void Bar::SetZ( int z ) 67 | { 68 | this->impl->_z = z; 69 | } 70 | -------------------------------------------------------------------------------- /Unit-Tests/Bar.hpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @copyright (c) 2015 - Jean-David Gadina - www.xs-labs.com 27 | * @brief Test class Bar 28 | */ 29 | 30 | #ifndef BAR_H 31 | #define BAR_H 32 | 33 | #include "Foo.hpp" 34 | #include 35 | 36 | class Bar: public Foo, public XS::PIMPL::Object< Bar > 37 | { 38 | public: 39 | 40 | using XS::PIMPL::Object< Bar >::impl; 41 | 42 | Bar( void ); 43 | Bar( int x, int y, int z ); 44 | int GetZ( void ); 45 | void SetZ( int z ); 46 | }; 47 | 48 | #endif /* BAR_H */ 49 | -------------------------------------------------------------------------------- /Unit-Tests/Foo.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @copyright (c) 2015 - Jean-David Gadina - www.xs-labs.com 27 | * @brief Test class Foo 28 | */ 29 | 30 | #include "Foo.hpp" 31 | 32 | template<> 33 | class XS::PIMPL::Object< Foo >::IMPL 34 | { 35 | public: 36 | 37 | IMPL( void ): _x( 0 ), _y( 0 ) 38 | {} 39 | 40 | IMPL( int x, int y ): _x( x ), _y( y ) 41 | {} 42 | 43 | IMPL( const IMPL & o ): _x( o._x ), _y( o._y ) 44 | {} 45 | 46 | ~IMPL( void ) 47 | {} 48 | 49 | int _x; 50 | int _y; 51 | }; 52 | 53 | #define XS_PIMPL_CLASS Foo 54 | #include 55 | 56 | Foo::Foo( void ): XS::PIMPL::Object< Foo >( 0, 0 ) 57 | {} 58 | 59 | Foo::Foo( int x, int y ): XS::PIMPL::Object< Foo >( x, y ) 60 | {} 61 | 62 | int Foo::GetX( void ) 63 | { 64 | return this->impl->_x; 65 | } 66 | 67 | int Foo::GetY( void ) 68 | { 69 | return this->impl->_y; 70 | } 71 | 72 | void Foo::SetX( int x ) 73 | { 74 | this->impl->_x = x; 75 | } 76 | 77 | void Foo::SetY( int y ) 78 | { 79 | this->impl->_y = y; 80 | } 81 | -------------------------------------------------------------------------------- /Unit-Tests/Foo.hpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @copyright (c) 2015 - Jean-David Gadina - www.xs-labs.com 27 | * @brief Test class Foo 28 | */ 29 | 30 | #ifndef FOO_H 31 | #define FOO_H 32 | 33 | #include 34 | 35 | class Foo: XS::PIMPL::Object< Foo > 36 | { 37 | public: 38 | 39 | using XS::PIMPL::Object< Foo >::impl; 40 | 41 | Foo( void ); 42 | Foo( int x, int y ); 43 | int GetX( void ); 44 | int GetY( void ); 45 | void SetX( int x ); 46 | void SetY( int y ); 47 | }; 48 | 49 | #endif /* FOO_H */ 50 | -------------------------------------------------------------------------------- /Unit-Tests/Foobar.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @copyright (c) 2015 - Jean-David Gadina - www.xs-labs.com 27 | * @brief Test class Foobar 28 | */ 29 | 30 | #include "Foobar.hpp" 31 | #include "Foo.hpp" 32 | 33 | template<> 34 | class XS::PIMPL::Object< Foobar >::IMPL 35 | { 36 | public: 37 | 38 | IMPL( void ) 39 | {} 40 | 41 | IMPL( int x, int y ): _foo( x, y ) 42 | {} 43 | 44 | IMPL( const IMPL & o ): _foo( o._foo ) 45 | {} 46 | 47 | ~IMPL( void ) 48 | {} 49 | 50 | Foo _foo; 51 | }; 52 | 53 | #define XS_PIMPL_CLASS Foobar 54 | #include 55 | 56 | Foobar::Foobar( void ): XS::PIMPL::Object< Foobar >() 57 | {} 58 | 59 | Foobar::Foobar( int x, int y ): XS::PIMPL::Object< Foobar >( x, y ) 60 | {} 61 | 62 | int Foobar::GetX( void ) 63 | { 64 | return this->impl->_foo.GetX(); 65 | } 66 | 67 | int Foobar::GetY( void ) 68 | { 69 | return this->impl->_foo.GetY(); 70 | } 71 | 72 | void Foobar::SetX( int x ) 73 | { 74 | this->impl->_foo.SetX( x ); 75 | } 76 | 77 | void Foobar::SetY( int y ) 78 | { 79 | this->impl->_foo.SetY( y ); 80 | } 81 | -------------------------------------------------------------------------------- /Unit-Tests/Foobar.hpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @copyright (c) 2015 - Jean-David Gadina - www.xs-labs.com 27 | * @brief Test class Foobar 28 | */ 29 | 30 | #ifndef FOOBAR_H 31 | #define FOOBAR_H 32 | 33 | #include 34 | 35 | class Foobar: XS::PIMPL::Object< Foobar > 36 | { 37 | public: 38 | 39 | using XS::PIMPL::Object< Foobar >::impl; 40 | 41 | Foobar( void ); 42 | Foobar( int x, int y ); 43 | int GetX( void ); 44 | int GetY( void ); 45 | void SetX( int x ); 46 | void SetY( int y ); 47 | }; 48 | 49 | #endif /* FOOBAR_H */ 50 | -------------------------------------------------------------------------------- /Unit-Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Unit-Tests/XS-PIMPL-Object.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @copyright (c) 2015 - Jean-David Gadina - www.xs-labs.com 27 | * @brief Test case XS::PIMPL::Object 28 | */ 29 | 30 | #ifdef _WIN32 31 | #define XSTEST_MAIN 32 | #endif 33 | 34 | #define XSTEST_GTEST_COMPAT 35 | #include 36 | #include "Foo.hpp" 37 | #include "Bar.hpp" 38 | #include "Foobar.hpp" 39 | 40 | using namespace testing; 41 | 42 | TEST( XS_PIMPL_Object, FooClassGetter ) 43 | { 44 | Foo f; 45 | 46 | ASSERT_EQ( 0, f.GetX() ); 47 | ASSERT_EQ( 0, f.GetY() ); 48 | } 49 | 50 | TEST( XS_PIMPL_Object, FooClassSetter ) 51 | { 52 | Foo f; 53 | 54 | f.SetX( 1 ); 55 | f.SetY( 2 ); 56 | 57 | ASSERT_EQ( 1, f.GetX() ); 58 | ASSERT_EQ( 2, f.GetY() ); 59 | } 60 | 61 | TEST( XS_PIMPL_Object, FooClassConstructorWithParams ) 62 | { 63 | Foo f( 1, 2 ); 64 | 65 | ASSERT_EQ( 1, f.GetX() ); 66 | ASSERT_EQ( 2, f.GetY() ); 67 | } 68 | 69 | TEST( XS_PIMPL_Object, FooClassCopyConstructor ) 70 | { 71 | Foo f1( 1, 2 ); 72 | Foo f2( f1 ); 73 | 74 | ASSERT_EQ( 1, f2.GetX() ); 75 | ASSERT_EQ( 2, f2.GetY() ); 76 | } 77 | 78 | TEST( XS_PIMPL_Object, FooClassMoveConstructor ) 79 | { 80 | Foo f1( 1, 2 ); 81 | Foo f2 = std::move( f1 ); 82 | 83 | ASSERT_EQ( 1, f2.GetX() ); 84 | ASSERT_EQ( 2, f2.GetY() ); 85 | } 86 | 87 | TEST( XS_PIMPL_Object, FooClassAssigmnentOperator ) 88 | { 89 | Foo f1( 1, 2 ); 90 | Foo f2; 91 | 92 | f2 = f1; 93 | 94 | ASSERT_EQ( 1, f2.GetX() ); 95 | ASSERT_EQ( 2, f2.GetY() ); 96 | } 97 | 98 | TEST( XS_PIMPL_Object, BarClassGetter ) 99 | { 100 | Bar b; 101 | 102 | ASSERT_EQ( 0, b.GetX() ); 103 | ASSERT_EQ( 0, b.GetY() ); 104 | ASSERT_EQ( 0, b.GetZ() ); 105 | } 106 | 107 | TEST( XS_PIMPL_Object, BarClassSetter ) 108 | { 109 | Bar b; 110 | 111 | b.SetX( 1 ); 112 | b.SetY( 2 ); 113 | b.SetZ( 3 ); 114 | 115 | ASSERT_EQ( 1, b.GetX() ); 116 | ASSERT_EQ( 2, b.GetY() ); 117 | ASSERT_EQ( 3, b.GetZ() ); 118 | } 119 | 120 | TEST( XS_PIMPL_Object, BarClassConstructorWithParams ) 121 | { 122 | Bar b( 1, 2, 3 ); 123 | 124 | ASSERT_EQ( 1, b.GetX() ); 125 | ASSERT_EQ( 2, b.GetY() ); 126 | ASSERT_EQ( 3, b.GetZ() ); 127 | } 128 | 129 | TEST( XS_PIMPL_Object, BarClassCopyConstructor ) 130 | { 131 | Bar b1( 1, 2, 3 ); 132 | Bar b2( b1 ); 133 | 134 | ASSERT_EQ( 1, b2.GetX() ); 135 | ASSERT_EQ( 2, b2.GetY() ); 136 | ASSERT_EQ( 3, b2.GetZ() ); 137 | } 138 | 139 | TEST( XS_PIMPL_Object, BarClassMoveConstructor ) 140 | { 141 | Bar b1( 1, 2, 3 ); 142 | Bar b2 = std::move( b1 ); 143 | 144 | ASSERT_EQ( 1, b2.GetX() ); 145 | ASSERT_EQ( 2, b2.GetY() ); 146 | ASSERT_EQ( 3, b2.GetZ() ); 147 | } 148 | 149 | TEST( XS_PIMPL_Object, BarClassAssigmnetOperator ) 150 | { 151 | Bar b1( 1, 2, 3 ); 152 | Bar b2; 153 | 154 | b2 = b1; 155 | 156 | ASSERT_EQ( 1, b2.GetX() ); 157 | ASSERT_EQ( 2, b2.GetY() ); 158 | ASSERT_EQ( 3, b2.GetZ() ); 159 | } 160 | 161 | TEST( XS_PIMPL_Object, FoobarClassGetter ) 162 | { 163 | Foobar f; 164 | 165 | ASSERT_EQ( 0, f.GetX() ); 166 | ASSERT_EQ( 0, f.GetY() ); 167 | } 168 | 169 | TEST( XS_PIMPL_Object, FoobarClassSetter ) 170 | { 171 | Foobar f; 172 | 173 | f.SetX( 1 ); 174 | f.SetY( 2 ); 175 | 176 | ASSERT_EQ( 1, f.GetX() ); 177 | ASSERT_EQ( 2, f.GetY() ); 178 | } 179 | 180 | TEST( XS_PIMPL_Object, FoobarClassConstructorWithParams ) 181 | { 182 | Foobar f( 1, 2 ); 183 | 184 | ASSERT_EQ( 1, f.GetX() ); 185 | ASSERT_EQ( 2, f.GetY() ); 186 | } 187 | 188 | TEST( XS_PIMPL_Object, FoobarClassCopyConstructor ) 189 | { 190 | Foobar f1( 1, 2 ); 191 | Foobar f2( f1 ); 192 | 193 | ASSERT_EQ( 1, f2.GetX() ); 194 | ASSERT_EQ( 2, f2.GetY() ); 195 | } 196 | 197 | TEST( XS_PIMPL_Object, FoobarClassMoveConstructor ) 198 | { 199 | Foobar f1( 1, 2 ); 200 | Foobar f2 = std::move( f1 ); 201 | 202 | ASSERT_EQ( 1, f2.GetX() ); 203 | ASSERT_EQ( 2, f2.GetY() ); 204 | } 205 | 206 | TEST( XS_PIMPL_Object, FoobarClassAssigmnentOperator ) 207 | { 208 | Foobar f1( 1, 2 ); 209 | Foobar f2; 210 | 211 | f2 = f1; 212 | 213 | ASSERT_EQ( 1, f2.GetX() ); 214 | ASSERT_EQ( 2, f2.GetY() ); 215 | } 216 | -------------------------------------------------------------------------------- /VisualStudio/PIMPLTests.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {81b9e1f2-2b91-483b-b0df-5c3255a44278} 23 | Win32Proj 24 | 10.0 25 | Application 26 | v143 27 | Unicode 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | $(SolutionDir)Build\32\$(Configuration)\ 37 | $(SolutionDir)Build\32\$(Configuration)\Temp\$(ProjectName)\ 38 | 39 | 40 | $(SolutionDir)Build\32\$(Configuration)\ 41 | $(SolutionDir)Build\32\$(Configuration)\Temp\$(ProjectName)\ 42 | 43 | 44 | $(SolutionDir)Build\64\$(Configuration)\ 45 | $(SolutionDir)Build\64\$(Configuration)\Temp\$(ProjectName)\ 46 | 47 | 48 | $(SolutionDir)Build\64\$(Configuration)\ 49 | $(SolutionDir)Build\64\$(Configuration)\Temp\$(ProjectName)\ 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | NotUsing 68 | 69 | 70 | Disabled 71 | XS_PIMPL_EXPORTS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;DEBUG;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 72 | true 73 | EnableFastChecks 74 | MultiThreadedDebugDLL 75 | Level3 76 | 77 | 78 | .;..\PIMPL\include;..\Submodules\XSTest\XSTest\include%(AdditionalIncludeDirectories) 79 | 80 | 81 | true 82 | Console 83 | 84 | 85 | 86 | 87 | NotUsing 88 | 89 | 90 | Disabled 91 | XS_PIMPL_EXPORTS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;X64;DEBUG;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 92 | true 93 | EnableFastChecks 94 | MultiThreadedDebugDLL 95 | Level3 96 | 97 | 98 | .;..\PIMPL\include;..\Submodules\XSTest\XSTest\include%(AdditionalIncludeDirectories) 99 | 100 | 101 | true 102 | Console 103 | 104 | 105 | 106 | 107 | NotUsing 108 | 109 | 110 | XS_PIMPL_EXPORTS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 111 | MultiThreadedDLL 112 | Level3 113 | ProgramDatabase 114 | 115 | 116 | .;..\PIMPL\include;..\Submodules\XSTest\XSTest\include%(AdditionalIncludeDirectories) 117 | 118 | 119 | true 120 | Console 121 | true 122 | true 123 | 124 | 125 | 126 | 127 | NotUsing 128 | 129 | 130 | XS_PIMPL_EXPORTS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;X64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 131 | MultiThreadedDLL 132 | Level3 133 | ProgramDatabase 134 | 135 | 136 | .;..\PIMPL\include;..\Submodules\XSTest\XSTest\include%(AdditionalIncludeDirectories) 137 | 138 | 139 | true 140 | Console 141 | true 142 | true 143 | 144 | 145 | --------------------------------------------------------------------------------