Jump to content

Laurens

Members
  • Posts

    564
  • Joined

  • Last visited

Everything posted by Laurens

  1. Laurens

    .NET Headers

    Thanks a bunch, looking forward to it
  2. Laurens

    .NET Headers

    Hi Lazlo, Is it possible to get the source code for the wrapper instead of the DLL? Thanks!
  3. Nevermind. C++ does not have typeof so it would never work anyway. I got to get out of my C# head
  4. On a side note: Class templating is not what I am looking for. This would force my service provider to handle only one type of class where I need one service provider to handle many.
  5. Hello, I am currently working on a service provider which will hold instances of classes such as the renderer and the state manager which all derive from the Service class. To do so I though I could use templating. Broken header file: #include <map> #include "Service.h" class ServiceProvider { public: // Methods. template<class Type> void AddService(Type type, Service* service); template <class Type> Service* GetService(Type type); private: // Globals. map<class type, Service*> services; }; I want to be able to store all these services in the map with the type as the key so I can do GetService<StateManager> for example. Is it possible to template member attributes this way? Thanks!
  6. So C#'s TreeView now supports multiple columns? To be quite frank, I havn't used C# for several years.
  7. While I have never used wxWidgets, as a C# programmer I can recommend this control: http://www.codeproject.com/KB/tree/treeviewadv.aspx. I have used it in several projects and looks like exactly what you need. Cheers!
  8. I am much more interested in what Josh was dreaming about to be honest.
  9. Laurens

    C++ events

    That is working simply amazing, thanks a bunch Rick
  10. Laurens

    C++ events

    That seems really interesting Rick, the usage almost feels like C# I would love to see the implementation if you can dig it up. Cheers!
  11. Laurens

    C++ events

    Thanks Pixel, that was extremely helpful Cheers!
  12. Laurens

    C++ events

    Hello, Coming from C# I have a difficult time comprehending events in C++. All I found on Google was twenty different snippets of code with little explanation, which is why I am asking here. My situation is as follows: I have a State class which is the base class for GameState and PauseState. The state is responsible for handling input from the player. Managing the states is the StateManager. The StateManager is capable of switching between states. Currently, the constructor of State requires a reference to the StateManager so it can call the SetState method in it. I find this a horrid solution and wish to implement it so that StateManager subscribes to a StateChanged event in the State class which can then be fired when the escape key is pressed ala C#. How would I go about implementing such a system in C++? Thanks!
  13. Agreed. I'm currently using Framewerk in my space simulator. All that Framewerk really does is reduce the amount of rendering code you have to write and I feel in no way you have to take serious considerations when designing your game. It almost does plug right in. On top of that, I tried writing combined postprocessing effects and it was absolutely horrid. I love how Framewerk relieved that burden. I do agree some more control over the effects Framewerk provides would be a welcome addition.
  14. Probably better to lock it entirely. I am used to go to forum.leadwerks.com directly and it confused me
×
×
  • Create New...