File: viewTest.h

package info (click to toggle)
eris 1.3.13-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,916 kB
  • ctags: 1,679
  • sloc: cpp: 12,043; sh: 9,050; perl: 287; makefile: 197; ansic: 165
file content (49 lines) | stat: -rw-r--r-- 973 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef VIEW_TEST_H
#define VIEW_TEST_H

#include <string>
#include <set>

namespace Eris
{
    class Entity;
    class View;
}

class Controller;

void testCharacterInitialVis(Controller&);
void testAppearance(Controller& ctl);
void testLookQueue(Controller& ctl);
void testEntityCreation(Controller& ctl);
void testUnseen(Controller& ctl);
void testTasks(Controller& ctl);

class WaitForAppearance
{
public:
    WaitForAppearance(Eris::View* v, const std::string& eid);    
    void waitFor(const std::string& eid);    
    void run();
private:
    void onAppear(Eris::Entity* e);
        
    Eris::View* m_view;
    std::set<std::string> m_waiting;
};

class WaitForDisappearance
{
public:
    WaitForDisappearance(Eris::View* v, const std::string& eid);    
    void waitFor(const std::string& eid);    
    void run();

private:
    void onDisappear(Eris::Entity* e);
        
    Eris::View* m_view;
    std::set<std::string> m_waiting;
};

#endif // of VIEW_TEST_H