Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dabbertorres/experiments
Collection of different experiments. Mostly different classes doing different things.
https://github.com/dabbertorres/experiments
Last synced: about 2 months ago
JSON representation
Collection of different experiments. Mostly different classes doing different things.
- Host: GitHub
- URL: https://github.com/dabbertorres/experiments
- Owner: dabbertorres
- License: mit
- Created: 2015-06-13T09:08:38.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-26T20:04:51.000Z (over 8 years ago)
- Last Synced: 2023-08-21T18:13:15.765Z (over 1 year ago)
- Language: C++
- Size: 20.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Experiments
Collection of different experiments. Mostly different classes doing different things.# What are they?
## Property
I'm a fan of C#'s Properties. They're a nice way to handle modifying the behavior of getting and setting private members, rather than writing full blown getter and setter functions. Plus, they allow for nice syntax.
So, that's what Property does.
You give it two functions, (uses std::function internally. lambdas are recommended). And it does the rest.
To "get", use function call syntax: "()". To set, use assignment syntax: "=".
And that's it!main.cpp has an example.