Class++ | Classes and OOP made easy and powerful with Access Specifiers, function overloading and more!

Hmm… that might be a bug, can you create a bug report on the GitHub so I can get it solved ASAP? Sorry about the issue by the way. (You can also post the code you’re having trouble with as well.)

Alright, turns out that was a bug and not intentional (base class’s constructor shouldn’t be called).
In the next update, the base class’s constructor will be called without problems, and bugs should be fixed.

1 Like

I was wondreing about this API and came up with an idea. Why wouldn’t you add a function to transfer an object or class to the different side (client->server\server->client)? This would be such a great feature that will save some time and prevent people from re-inventing the wheel

It’s pretty easy to sync the classes between different environments, an example would be is to create a module that creates a class inside it that can be required from both server and the client, and that class would have a function that takes in the data from different environments and creates an object through this data. All you would have to do is to setup the server-client connection through scripts.

But still, if you implement this feature in your module, this would be a nice bonus

I can’t really implement it to this module, but maybe in the future I can put a small template system inside the GitHub repo to make people’s lives easier.

Sad. But thanks for the answer, although

1 Like

Release 1.2.0


  • class.Inherits and class.Friends properties no longer store classes in a Dictionary. They’re now stored in an Array.
  • Constructors in inherited classes will now call the base class’s constructor first. Then the derived class’s constructor will be called next.
    • This is to match how C++ handles constructors.
  • The classMemberNotFound error will no longer stop the running thread. (NonFatal)
  • In the Error API, logErrorNonFatal method will now correctly display the stack trace.
  • Bug fixes and performance improvements.

(@Neuroticxs try this update and let me know if it fixes your problem.)

1 Like

I’ve made a bug report on GItHub about inheritance. Could you check it, please? In a nutshell, parent class constructor can’t modify private and protected fields when called in inherited class

U. P. D.: The issue was in edited version of the API. Sorry, my bad

Woah! Just stumbled upon this and made me remember one of my (forgotten) resources!

Upon checking the code, primarily Util, looks quite similar to the starting functions of mine. To no assumption would I be saying anything ill regarding about this though! I highly appreciate on how this is a much more superb, flexible, and expanded version of mine! :slight_smile:

Continue on what you’re doing with this, I’d love to see what more features you can add!!

(I’m quite curious if you took inspiration from mine. :sweat_smile:)

Actually, yeah! I got inspired from you a lot in this project, especially the way you used the debug library to obtain information about the stack trace, though I heavily modified the method you used to have high performance (1µs) and more capability.
I forgot to credit you though, so, in a next version, I will credit you in the Util module.

1 Like

I replied to your issue on GitHub.

1 Like

Would it be cool if there was a plugin for Class++ that creates preset boilerplate class when typing out some keyword? (similar to how VSCode does it with C++). Maybe something like typing out “cppclass” or just “class”.

There is a plugin that autofills services by typing the keywords, you could take a look at that :eyes:

1 Like

That’s a pretty great idea! I was already thinking of creating a plugin to show some performance analytics about the objects that you create, but this would make it even better. I will probably make it so you can create your own snippets too.

(This would also be a good excuse to spend some time while waiting for the new Type Solver to be complete so I can release version 1.3.0 -or 2.0- lol)

1 Like

What I feel this is, is just an easier and more expanded on type system/handler. Looks good but by its self I might not end up using since I tend to not use custom types that often.

Quick update: I am currently in the progress of writing the plugin.
(Had to migrate PluginComponents resource to Fusion 0.3 so it took a while to get started lol.)

Currently planned features:

  • Customizable class auto-complete

    • You’ll be easily able to create boilerplate classes that you can easily auto-complete into your script.
  • Automatic version-checking

    • The plugin will give you an option to automatically update the Class++ Module so you won’t need to think about updating the plugin. If there are any major changes between versions, the plugin will tell you.
  • Class Explorer

    • (May or may not make it in) The plugin will display a window that allows you to easily configure your classes without having to be too dependant on code.

If you have any suggestions or features you want to see, feel free to let me know!

2 Likes

Please keep us updated, this plugins seems helpful!

1 Like

Update!

Here’s what the Class Snippets menu will look like:

It displays snippets with their name, prefix and description. It’s not close to being finished yet as I haven’t even finished designing the main snippet editing tab, but soon I’ll give you guys an update.

Feel free to let me know if you have any suggestions or requests!

2 Likes

Hello! Just wanted to give an update again.

The plugin is soon to be done, snippet editing has been implemented quite well, and it works without any (obvious) problems so far.

Though I’ve decided to seperate the plugin into 2 versions, one free and one full version.

The free version will have:

  • Easy snippet configuration.

    • You’ll easily be able to modify the Public and Private fields of the class snippet without having to write a single line of code.
    • Snippets will have names, prefixes and descriptions that you can configure.
  • Version Checking

    • The plugin will tell you if you’re running an outdated version of Class++, this will be configurable in the Settings.
  • Easy Class++ set-up

    • When you first install the plugin, it will display a window offering you to automatically set-up Class++ in a folder you choose.

The full version will have all the features from the free version, and:

  • Full snippet configuration.

    • You’ll be able to modify a snippet without any restrictions or limitations. You’ll be able to add members to the Protected access specifier, and you’ll be able to add code directly into the snippet, allowing you to add all sorts of members and functions.
    • There will be very little limits on the snippet name, prefix, and the description.
  • A much more detailed snippets menu that displays more information. (Will be configurable in settings)

  • Ability to export or import snippets from .json files.

    • You’ll be able to export or import a snippet.json file from the plugin, allowing you to freely modify the snippets as you wish.
  • Automatic version updating. (Will be configurable in settings)

    • In a folder you choose, the plugin will automatically put the latest version of Class++ and notify you of the major features that has been added.

The full version will be released on Patreon and will cost probably around 4 or 5$.

Let me know if you have any problems or questions!

1 Like

Update: Here’s how the snippet editor will look like:

Let me know if you have any questions or suggestions!

2 Likes