DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SchemaCommand.hpp
Go to the documentation of this file.
1#ifndef SCHEMACOMMAND_H
2#define SCHEMACOMMAND_H
3
5#include <QUndoCommand>
6#include "oks/class.hpp"
8#include "oks/method.hpp"
9#include "oks/attribute.hpp"
10
11namespace dunedaq {
12 namespace oks {
13 class OksClass;
14 }
15}
16
17namespace dbse
18{
19
21class SetAbstractClassCommand: public QUndoCommand
22{
23public:
24 SetAbstractClassCommand ( dunedaq::oks::OksClass * Class, bool Value );
26 void redo();
27 void undo();
28private:
29 std::string ClassName;
32};
33
34class SetDescriptionClassCommand: public QUndoCommand
35{
36public:
37 SetDescriptionClassCommand ( dunedaq::oks::OksClass * Class, std::string Description );
39 void redo();
40 void undo();
41private:
42 std::string ClassName;
43 std::string NewDescription;
44 std::string OldDescription;
45};
46
47class AddSuperClassCommand: public QUndoCommand
48{
49public:
50 AddSuperClassCommand ( dunedaq::oks::OksClass * Class, std::string SuperClass );
52 void redo();
53 void undo();
54private:
55 std::string ClassName;
56 std::string NewSuperClass;
57};
58
59class RemoveSuperClassCommand: public QUndoCommand
60{
61public:
64 void redo();
65 void undo();
66private:
67 std::string ClassName;
68 std::string SuperClass;
69};
70
71class CreateClassCommand: public QUndoCommand
72{
73public:
74 CreateClassCommand ( std::string ClassName, std::string ClassDescription, bool Abstract );
76 void redo();
77 void undo();
78private:
80 std::string SchemaClassName;
83};
84
85class RemoveClassCommand: public QUndoCommand
86{
87public:
88 RemoveClassCommand ( dunedaq::oks::OksClass * Class, std::string ClassName, std::string ClassDescription,
89 bool Abstract );
91 void redo();
92 void undo();
93private:
95 std::string SchemaClassName;
98};
99
101class SetNameRelationshipCommand: public QUndoCommand
102{
103public:
104 SetNameRelationshipCommand ( dunedaq::oks::OksClass* Class, dunedaq::oks::OksRelationship * Relationship, std::string Name );
106 void redo();
107 void undo();
108private:
109 std::string ClassName;
113};
114
115class SetClassTypeRelationshipCommand: public QUndoCommand
116{
117public:
118 SetClassTypeRelationshipCommand ( dunedaq::oks::OksClass* Class, dunedaq::oks::OksRelationship * Relationship, std::string ClassType );
120 void redo();
121 void undo();
122private:
123 std::string ClassName;
125 std::string RelationshipName;
128};
129
130class SetDescriptionRelationshipCommand: public QUndoCommand
131{
132public:
134 std::string Description );
136 void redo();
137 void undo();
138private:
139 std::string ClassName;
141 std::string RelationshipName;
142 std::string NewDescription;
143 std::string OldDescription;
144};
145
162
179
180class SetIsCompositeRelationshipCommand: public QUndoCommand
181{
182public:
185 void redo();
186 void undo();
187private:
188 std::string ClassName;
190 std::string RelationshipName;
193};
194
195class SetIsDependentRelationshipCommand: public QUndoCommand
196{
197public:
200 void redo();
201 void undo();
202private:
203 std::string ClassName;
205 std::string RelationshipName;
208};
209
210class SetIsExclusiveRelationshipCommand: public QUndoCommand
211{
212public:
215 void redo();
216 void undo();
217private:
218 std::string ClassName;
220 std::string RelationshipName;
223};
224
225class AddRelationship: public QUndoCommand
226{
227public:
228 AddRelationship ( dunedaq::oks::OksClass * Class, std::string Name, std::string Description,
229 std::string Type, bool Composite, bool Exclusive, bool Dependent,
233 void redo();
234 void undo();
235private:
236 std::string ClassName;
238 std::string RelationshipName;
240 std::string RelationshipType;
246};
247
271
273class SetMethodImplementationLanguage: public QUndoCommand
274{
275public:
279 std::string Language );
281 void redo();
282 void undo();
283private:
284 std::string ClassName;
285 std::string MethodName;
287 std::string NewLanguage;
288 std::string OldLanguage;
289};
290
291class SetMethodImplementationPrototype: public QUndoCommand
292{
293public:
297 std::string Prototype );
299 void redo();
300 void undo();
301private:
302 std::string ClassName;
303 std::string MethodName;
306 std::string NewPrototype;
307 std::string OldPrototype;
308};
309
310class SetMethodImplementationBody: public QUndoCommand
311{
312public:
315 void redo();
316 void undo();
317private:
318 std::string ClassName;
319 std::string MethodName;
322 std::string NewBody;
323 std::string OldBody;
324};
325
326class AddMethodImplementationComand: public QUndoCommand
327{
328public:
330 dunedaq::oks::OksMethod * Method, std::string Language,
331 std::string Prototype, std::string Body );
333 void redo();
334 void undo();
335private:
336 std::string ClassName;
338 std::string MethodName;
342};
343
344class RemoveMethodImplementationComand: public QUndoCommand
345{
346public:
348 dunedaq::oks::OksMethod * Method, std::string Language,
349 std::string Prototype, std::string Body );
351 void redo();
352 void undo();
353private:
354 std::string ClassName;
356 std::string MethodName;
360};
361
363class SetNameMethodCommand: public QUndoCommand
364{
365public:
366 SetNameMethodCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksMethod * Method, std::string name );
368 void redo();
369 void undo();
370private:
371 std::string ClassName;
373 std::string NewMethodName;
374 std::string OldMethodName;
375};
376
377class SetDescriptionMethodCommand: public QUndoCommand
378{
379public:
380 SetDescriptionMethodCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksMethod * Method, std::string description );
382 void redo();
383 void undo();
384private:
385 std::string ClassName;
387 std::string MethodName;
390};
391
392class AddMethodCommand: public QUndoCommand
393{
394public:
395 AddMethodCommand ( dunedaq::oks::OksClass * Class, std::string name, std::string description );
397 void redo();
398 void undo();
399private:
400 std::string ClassName;
402 std::string SchemaName;
403 std::string SchemaDescription;
404};
405
406class RemoveMethodCommand: public QUndoCommand
407{
408public:
409 RemoveMethodCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksMethod * Method, std::string name,
410 std::string description );
412 void redo();
413 void undo();
414private:
415 std::string ClassName;
417 std::string SchemaName;
418 std::string SchemaDescription;
419};
420
422class SetAttributeNameCommand: public QUndoCommand
423{
424public:
425 SetAttributeNameCommand ( dunedaq::oks::OksClass* Class, dunedaq::oks::OksAttribute * Attribute, std::string NewName );
427 void redo();
428 void undo();
429private:
430 std::string ClassName;
432 std::string NewAttributeName;
433 std::string OldAttributeName;
434};
435
436class SetAttributeDescriptionCommand: public QUndoCommand
437{
438public:
439 SetAttributeDescriptionCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksAttribute * Attribute, std::string NewDescription );
441 void redo();
442 void undo();
443private:
444 std::string ClassName;
446 std::string AttributeName;
449};
450
451class SetAttributeTypeCommand: public QUndoCommand
452{
453public:
454 SetAttributeTypeCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksAttribute * Attribute, std::string NewType );
456 void redo();
457 void undo();
458private:
459 std::string ClassName;
461 std::string AttributeName;
462 std::string NewAttributeType;
463 std::string OldAttributeType;
464};
465
466class SetAttributeRangeCommand: public QUndoCommand
467{
468public:
469 SetAttributeRangeCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksAttribute * Attribute, std::string NewRange );
471 void redo();
472 void undo();
473private:
474 std::string ClassName;
476 std::string AttributeName;
477 std::string NewAttributeRange;
478 std::string OldAttributeRange;
479};
480
495
496class SetAttributeMultiCommand: public QUndoCommand
497{
498public:
499 SetAttributeMultiCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksAttribute * Attribute, bool NewIsMulti );
501 void redo();
502 void undo();
503private:
504 std::string ClassName;
506 std::string AttributeName;
509};
510
511class SetAttributeIsNullCommand: public QUndoCommand
512{
513public:
514 SetAttributeIsNullCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksAttribute * Attribute, bool NewIsNull );
516 void redo();
517 void undo();
518private:
519 std::string ClassName;
521 std::string AttributeName;
524};
525
526class SetAttributeInitialValuesCommand: public QUndoCommand
527{
528public:
529 SetAttributeInitialValuesCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksAttribute * Attribute, std::string NewValues );
531 void redo();
532 void undo();
533private:
534 std::string ClassName;
536 std::string AttributeName;
539};
540
541class AddAttributeCommand: public QUndoCommand
542{
543public:
544 AddAttributeCommand ( dunedaq::oks::OksClass * Class, std::string name, std::string type, bool is_mv,
545 std::string range, std::string init_values, std::string description,
548 void redo();
549 void undo();
550private:
551 std::string ClassName;
553 std::string SchemaName;
554 std::string SchemaType;
556 std::string SchemaRange;
557 std::string SchemaInitValues;
558 std::string SchemaDescription;
561};
562
563class RemoveAttributeCommand: public QUndoCommand
564{
565public:
566 RemoveAttributeCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksAttribute * Attribute, std::string name,
567 std::string type, bool is_mv, std::string range,
568 std::string init_values, std::string description, bool is_null,
571 void redo();
572 void undo();
573private:
574 std::string ClassName;
576 std::string SchemaName;
577 std::string SchemaType;
579 std::string SchemaRange;
580 std::string SchemaInitValues;
581 std::string SchemaDescription;
584};
585
586} // namespace dbse
587
588#endif // SCHEMACOMMAND_H
AddAttributeCommand(dunedaq::oks::OksClass *Class, std::string name, std::string type, bool is_mv, std::string range, std::string init_values, std::string description, bool is_null, dunedaq::oks::OksAttribute::Format format=dunedaq::oks::OksAttribute::Format::Dec)
dunedaq::oks::OksAttribute * SchemaAttribute
dunedaq::oks::OksAttribute::Format SchemaFormat
AddMethodCommand(dunedaq::oks::OksClass *Class, std::string name, std::string description)
dunedaq::oks::OksMethod * SchemaMethod
dunedaq::oks::OksMethod * SchemaMethod
AddMethodImplementationComand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string Language, std::string Prototype, std::string Body)
dunedaq::oks::OksRelationship::CardinalityConstraint RelationshipLowCc
dunedaq::oks::OksRelationship::CardinalityConstraint RelationshipHighCc
std::string RelationshipDescription
dunedaq::oks::OksRelationship * SchemaRelationship
AddRelationship(dunedaq::oks::OksClass *Class, std::string Name, std::string Description, std::string Type, bool Composite, bool Exclusive, bool Dependent, dunedaq::oks::OksRelationship::CardinalityConstraint LowCc, dunedaq::oks::OksRelationship::CardinalityConstraint HighCc)
AddSuperClassCommand(dunedaq::oks::OksClass *Class, std::string SuperClass)
CreateClassCommand(std::string ClassName, std::string ClassDescription, bool Abstract)
dunedaq::oks::OksClass * SchemaClass
dunedaq::oks::OksAttribute::Format SchemaFormat
RemoveAttributeCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string name, std::string type, bool is_mv, std::string range, std::string init_values, std::string description, bool is_null, dunedaq::oks::OksAttribute::Format format=dunedaq::oks::OksAttribute::Format::Dec)
dunedaq::oks::OksAttribute * SchemaAttribute
dunedaq::oks::OksClass * SchemaClass
RemoveClassCommand(dunedaq::oks::OksClass *Class, std::string ClassName, std::string ClassDescription, bool Abstract)
RemoveMethodCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string name, std::string description)
dunedaq::oks::OksMethod * SchemaMethod
dunedaq::oks::OksMethod * SchemaMethod
RemoveMethodImplementationComand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string Language, std::string Prototype, std::string Body)
dunedaq::oks::OksRelationship::CardinalityConstraint RelationshipLowCc
dunedaq::oks::OksRelationship * SchemaRelationship
dunedaq::oks::OksRelationship::CardinalityConstraint RelationshipHighCc
RemoveRelationship(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, std::string Name, std::string Description, std::string Type, bool Composite, bool Exclusive, bool Dependent, dunedaq::oks::OksRelationship::CardinalityConstraint LowCc, dunedaq::oks::OksRelationship::CardinalityConstraint HighCc)
RemoveSuperClassCommand(dunedaq::oks::OksClass *Class, std::string SuperClass)
SetAbstractClassCommand(dunedaq::oks::OksClass *Class, bool Value)
SetAttributeDescriptionCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewDescription)
dunedaq::oks::OksAttribute * SchemaAttribute
SetAttributeFormatCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, dunedaq::oks::OksAttribute::Format NewFormat)
dunedaq::oks::OksAttribute::Format OldAttributeFormat
dunedaq::oks::OksAttribute * SchemaAttribute
dunedaq::oks::OksAttribute::Format NewAttributeFormat
dunedaq::oks::OksAttribute * SchemaAttribute
SetAttributeInitialValuesCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewValues)
SetAttributeIsNullCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, bool NewIsNull)
dunedaq::oks::OksAttribute * SchemaAttribute
dunedaq::oks::OksAttribute * SchemaAttribute
SetAttributeMultiCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, bool NewIsMulti)
dunedaq::oks::OksAttribute * SchemaAttribute
SetAttributeNameCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewName)
SetAttributeRangeCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewRange)
dunedaq::oks::OksAttribute * SchemaAttribute
SetAttributeTypeCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewType)
dunedaq::oks::OksAttribute * SchemaAttribute
dunedaq::oks::OksRelationship * SchemaRelationship
SetClassTypeRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, std::string ClassType)
SetDescriptionClassCommand(dunedaq::oks::OksClass *Class, std::string Description)
SetDescriptionMethodCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string description)
dunedaq::oks::OksMethod * SchemaMethod
dunedaq::oks::OksRelationship * SchemaRelationship
SetDescriptionRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, std::string Description)
dunedaq::oks::OksRelationship::CardinalityConstraint NewHighCc
dunedaq::oks::OksRelationship::CardinalityConstraint OldHighCc
dunedaq::oks::OksRelationship * SchemaRelationship
SetHighCcRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, dunedaq::oks::OksRelationship::CardinalityConstraint NewCardinality)
SetIsCompositeRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, bool Value)
dunedaq::oks::OksRelationship * SchemaRelationship
SetIsDependentRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, bool Value)
dunedaq::oks::OksRelationship * SchemaRelationship
SetIsExclusiveRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, bool Value)
dunedaq::oks::OksRelationship * SchemaRelationship
SetLowCcRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, dunedaq::oks::OksRelationship::CardinalityConstraint NewCardinality)
dunedaq::oks::OksRelationship::CardinalityConstraint OldLowCc
dunedaq::oks::OksRelationship * SchemaRelationship
dunedaq::oks::OksRelationship::CardinalityConstraint NewLowCc
SetMethodImplementationBody(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, dunedaq::oks::OksMethodImplementation *Implementation, std::string Body)
dunedaq::oks::OksMethodImplementation * SchemaImplementation
Methods implementation commands.
dunedaq::oks::OksMethodImplementation * SchemaImplementation
SetMethodImplementationLanguage(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, dunedaq::oks::OksMethodImplementation *Implementation, std::string Language)
dunedaq::oks::OksMethodImplementation * SchemaImplementation
SetMethodImplementationPrototype(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, dunedaq::oks::OksMethodImplementation *Implementation, std::string Prototype)
dunedaq::oks::OksMethod * SchemaMethod
SetNameMethodCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string name)
dunedaq::oks::OksRelationship * SchemaRelationship
SetNameRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, std::string Name)
OKS attribute class.
The OKS class.
Definition class.hpp:200
OKS method implementation class.
Definition method.hpp:35
OKS method class.
Definition method.hpp:153
Including QT Headers.
Including Qt Headers.
Definition __init__.py:1