-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathassemblyelement.h
More file actions
56 lines (47 loc) · 2.13 KB
/
Copy pathassemblyelement.h
File metadata and controls
56 lines (47 loc) · 2.13 KB
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
//===============================================================================//
// Name : assemblyelement.h
// Author(s) : Barbara Bruno
// Affiliation : University of Genova, Italy - dept. DIBRIS
// Description : "Assembly operations"-specific class for AO nodes
//===============================================================================//
#ifndef ASSEMBLY_ELEMENT_H
#define ASSEMBLY_ELEMENT_H
#include "element.h"
//! derivate class "AssemblyElement" for the "Assembly operations"-specific parameters inside a node
class AssemblyElement: public NodeElement
{
public:
vector<string> actions; //!< list of actions required by the assembly operation
vector<bool> done; //!< done[i]: the i-th action has been performed
bool finished; //!< finished: all actions have been performed
bool sequential; //!< sequential: the actions MUST be performed in order
int level; //!< stage of the whole assembly task at which this operation is performed
//! constructor
AssemblyElement(vector<string> some_actions, bool some_sequential, int some_level): NodeElement()
{
actions = some_actions;
// initialize the "done" flags as false for all actions
for (int i=0; i< (int)actions.size(); i++)
done.push_back(false);
// initialize the "finished" flag as false
finished = false;
sequential = some_sequential;
level = some_level;
}
//! display element information
void printNodeElementInfo()
{
cout<<"Level of the assembly operation: " <<level <<endl;
cout<<"Is finished? " <<boolalpha <<finished <<endl;
cout<<"Is sequential? " <<boolalpha <<sequential <<endl;
cout<<"Actions in the assembly operation:" <<endl;
for (int i=0; i< (int)actions.size(); i++)
cout<<actions[i] <<" - done? " <<boolalpha <<done[i] <<endl;
}
//! destructor
~AssemblyElement()
{
//DEBUG:cout<<endl <<"Destroying AssemblyElement object" <<endl;
}
};
#endif