What is Broodwar in a sentence like "Broodwar->isReplay()" object pointer? object? variable?

6 views
Skip to first unread message

Lubybyby

unread,
Mar 9, 2016, 10:50:07 AM3/9/16
to bwapi
Hi all,

What is the "Broodwa"r in a sentence like "Broodwar->isReplay()"?
Since it is using a "->", I guess it is a object pointer. However, when I check the definition in Game.h, it says:
"extern GameWrapper Broodwar;", from which I assume it is a object.... so what is it...


I'm a newbie in BWAPI as well as c++ programming. I learnt c++ in college but didn't really understand. Recently I just picked up some online videos and decided to read some BWAPI source code. Sorry if the question is too naive...

Lubybyby

Adam Heinermann

unread,
Mar 9, 2016, 12:06:46 PM3/9/16
to bw...@googlegroups.com

It's technically an object, so that iostream operators can be overloaded for it. The pointer member operator is also overloaded to access a pointer to the game object. It's an object that wraps a pointer.

--

---
You received this message because you are subscribed to the Google Groups "bwapi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bwapi+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages