Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
Query about data structure for stateManager
Print
Pages: [
1
]
Author
Topic: Query about data structure for stateManager (Read 1728 times)
0 Members and 1 Guest are viewing this topic.
smilesprower
Newbie
Posts: 25
Query about data structure for stateManager
«
on:
October 14, 2016, 11:42:20 pm »
Just inquiring what would be considered a good data structure to use for a manager of states ?
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11030
AW: Query about data structure for stateManager
«
Reply #1 on:
October 15, 2016, 12:20:07 am »
A class? And to hold the states you could use a vector/stack/deqeue of unique_ptrs.
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
smilesprower
Newbie
Posts: 25
Re: Query about data structure for stateManager
«
Reply #2 on:
October 15, 2016, 02:28:32 am »
Yes of course there will be a class lol.
What I mean is, whats the best solution for changing scenes, deleting, checking if scene exists before creating a new one etc. Apologies if my questions wasn't clear.
Logged
Mario
SFML Team
Hero Member
Posts: 879
Re: Query about data structure for stateManager
«
Reply #3 on:
October 15, 2016, 10:09:30 am »
There's no best. There are different approaches depending on what you have in mind or what you need. Some might fit for project B but could be bad for project C.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
Query about data structure for stateManager
anything