cppchips: C++17 code generator
❗ Early development stage 🚦
🔠 Languages: EN RU
🍀 Supported C++ constructions
- class and struct.
- class constructors.
- class member fields - with autogeneration getter and setter.
- initializer list in constructor (withoout initialize base class).
- class member functions.
- virtual functions and override in child classes.
- simple functions, variables.
🚀 Simple start
cppchips input:
from src.cppchips import *
animalClass = CppClass('Animal')
animalClass.private \
.add_variable(CppString(), 'var1') \
animalClass.public \
.add_virtual_method('say', CppVoid(), [], 'std::cout << "---\\n";', noexcept=True) \
.add_virtual_method('pay', CppInt(), [CppVariable(CppDouble(), 'cost')], '// pay to win!') \
.add_constructor() \
.add_getter('var1') \
.add_setter('var1')
print(animalClass.gen_definition_str())
catClass = CppClass('Cat')
catClass.add_base_class(animalClass).public \
.add_override_method('say') \
.add_constructor() \
.add_override_method('pay')
print(catClass.gen_definition_str())
C++ result:
class Animal {
public:
Animal() {}
virtual void say() noexcept { std::cout << "---\n"; }
virtual int pay(double cost) {
// pay to win!
}
auto &getvar1() noexcept { return mvar1; }
const auto &getvar1() const noexcept { return mvar1; }
void setvar1(const std::string &avar1) { mvar1 = avar1; }
private:
std::string mvar1;
};
class Cat : public Animal {
public:
Cat() {}
void say() noexcept override {}
int pay(double cost) override { return {}; }
};
Metadata
Release files for cppchips 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cppchips-0.0.1.tar.gz | 7.4 kB | Without provenance | Details for cppchips-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cppchips-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for cppchips-0.0.1-py3-none-any.whl |
Total release size: 15.1 kB
Release files / cppchips-0.0.1.tar.gz
| Download URL | cppchips-0.0.1.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7912b1364200e8459558069b6315384aaf695221e720e394d3dafa1502c5503a
|
|
BLAKE2b-256 checksum How to use checksums |
027c1b6495cf861bb4a555c78689a22eb9f78c2f0ec05f238cd71dc075b06529
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / cppchips-0.0.1-py3-none-any.whl
| Download URL | cppchips-0.0.1-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39251c41f93a230511ffcbe96659b69e7917634312e8a8d9582a47e6ec174be9
|
|
BLAKE2b-256 checksum How to use checksums |
add77d0c745b835b14bc04332cb3495a4f25052cff5bf313e44b93b321e28ef6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Security for cppchips 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.