summaryrefslogtreecommitdiff
path: root/CIAO/tests/DAnCE/Executor-Destructor/Exec_Dest_Status.h
blob: a733cda9d89f0c7e76e6a2b08d315faee43fc648 (plain)
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
50
51
52
53
54
55
56
57
58
59
60
// $Id$

/**
 * @file Exec_Dest_Status.h
 * @author William R. Otte <wotte@dre.vanderbilt.edu>
 *
 */

#ifndef EXEC_STATUS_H_
#define EXEC_STATUS_H_

#include "ace/Singleton.h"
#include "ace/Null_Mutex.h"

#include <map>
#include <string>

#include "Exec_Dest_Status_export.h"

namespace Deployment
{
  struct DeploymentPlan;
}

namespace dance_test
{
  class Exec_Dest_Status_Export Exec_Dest_Status
  {
  public:
    Exec_Dest_Status (void);

    ~Exec_Dest_Status (void);

    void plan (const ::Deployment::DeploymentPlan *plan);

    void destructor_called (const std::string &id);

    bool check_destructor (const std::string &id);
  private:

    struct Instance_Status
    {
      Instance_Status (void);

      bool destructor_;
    };

    typedef std::map <std::string, Instance_Status> Inst_Map;
    Inst_Map instances_;
  };

  typedef ACE_Singleton <Exec_Dest_Status,
                         ACE_Null_Mutex> EXEC_DEST_STATUS;
}

EXEC_DEST_STATUS_SINGLETON_DECLARE (ACE_Singleton,
                                    dance_test::Exec_Dest_Status,
                                    ACE_Null_Mutex)

#endif