summaryrefslogtreecommitdiff
path: root/DAnCE/tools/Split_Plan/Node_Splitter.h
blob: a11e488eb460784e3c9139f31397e5e94ddb79be (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
/**
 * @file Node_Splitter.h
 *
 * @author Martin Corino <mcorino@remedy.nl>
 */

#ifndef DANCE_NODE_SPLITTER_H
#define DANCE_NODE_SPLITTER_H

#include "ace/SStringfwd.h"
#include "dance/Deployment/Deployment_DeploymentPlanC.h"
#include "Split_Plan/DAnCE_Split_Plan_export.h"

namespace DAnCE
{
  class DAnCE_Split_Plan_Export Node_Splitter
  {
  public:
    typedef ACE_CString       KEY;
    typedef ACE_CString       FILTER;

    Node_Splitter (const Deployment::DeploymentPlan &plan);

    bool    match_instance (CORBA::ULong instance,
                            const FILTER &filter) const;

    bool    match_sub_plan (CORBA::ULong instance,
                            const KEY &sub_plan_key) const;

    void    prepare_sub_plan (CORBA::ULong instance,
                              Deployment::DeploymentPlan &sub_plan,
                              KEY &sub_plan_key);

    void    finalize_sub_plan (Deployment::DeploymentPlan &sub_plan,
                               KEY &sub_plan_key);

  private:
    const Deployment::DeploymentPlan &plan_;
  };
}
#endif