CMakePPLang Examples
This part provides usage examples of CMakePPLang classes and maps. These examples assume you have already set up your build system to download and include CMakePPLang automatically. If you have not done this step, please see Automatically Downloading and Including CMakePPLang.
- 1. Using Classes
- 1.1. Writing a Basic Class
- 1.2. Adding a Member Function
- 1.3. Adding a Function That Takes an Argument
- 1.4. Adding a Function That References Attributes
- 1.5. Returning a Value from a Function
- 1.6. Adding Multiple Return Points to a Function
- 1.7. Overloading a Function
- 1.8. Adding a User-Defined Constructor
- 1.9. Using the KWARGS Constructor
- 1.10. Writing a Derived Class
- 1.11. Inheriting from Multiple Classes
- 1.12. Adding A Pure Virtual Member Function
- 2. Using Utilities
- 2.1. Checking if Variables are Equal
- 2.2. Serializing a Variable
- 2.3. Copying a Variable
- 2.4. Checking if Variable Contains a Value
- 2.5. Determining the Type of a Variable
- 2.6. Check for Conflict with a Built-in Type
- 2.7. Returning a Value
- 2.8. Asserting a Condition
- 2.9. Checking if a Directory Exists
- 2.10. Checking if a File Exists
- 2.11. Manipulating Globals
- 2.12. Creating a Unique Identifier