DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SchemaCommand.hpp
Go to the documentation of this file.
1// DUNE DAQ modification notice:
2// This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
3// Fork baseline commit: dbe-02-12-17 (2022-05-12).
4// Renamed since fork: yes (from dbe/SchemaCommand.h to include/dbe/SchemaCommand.hpp).
5
6#ifndef SCHEMACOMMAND_H
7#define SCHEMACOMMAND_H
8
10#include <QUndoCommand>
11#include "oks/class.hpp"
12#include "oks/relationship.hpp"
13#include "oks/method.hpp"
14#include "oks/attribute.hpp"
15
16namespace dunedaq {
17 namespace oks {
18 class OksClass;
19 }
20}
21
22namespace dbse
23{
24
26class SetAbstractClassCommand: public QUndoCommand
27{
28public:
29 SetAbstractClassCommand ( dunedaq::oks::OksClass * Class, bool Value );
31 void redo();
32 void undo();
33private:
34 std::string ClassName;
37};
38
39class SetDescriptionClassCommand: public QUndoCommand
40{
41public:
42 SetDescriptionClassCommand ( dunedaq::oks::OksClass * Class, std::string Description );
44 void redo();
45 void undo();
46private:
47 std::string ClassName;
48 std::string NewDescription;
49 std::string OldDescription;
50};
51
52class AddSuperClassCommand: public QUndoCommand
53{
54public:
55 AddSuperClassCommand ( dunedaq::oks::OksClass * Class, std::string SuperClass );
57 void redo();
58 void undo();
59private:
60 std::string ClassName;
61 std::string NewSuperClass;
62};
63
64class RemoveSuperClassCommand: public QUndoCommand
65{
66public:
69 void redo();
70 void undo();
71private:
72 std::string ClassName;
73 std::string SuperClass;
74};
75
76class CreateClassCommand: public QUndoCommand
77{
78public:
79 CreateClassCommand ( std::string ClassName, std::string ClassDescription, bool Abstract );
81 void redo();
82 void undo();
83private:
85 std::string SchemaClassName;
88};
89
90class RemoveClassCommand: public QUndoCommand
91{
92public:
93 RemoveClassCommand ( dunedaq::oks::OksClass * Class, std::string ClassName, std::string ClassDescription,
94 bool Abstract );
96 void redo();
97 void undo();
98private:
100 std::string SchemaClassName;
103};
104
106class SetNameRelationshipCommand: public QUndoCommand
107{
108public:
109 SetNameRelationshipCommand ( dunedaq::oks::OksClass* Class, dunedaq::oks::OksRelationship * Relationship, std::string Name );
111 void redo();
112 void undo();
113private:
114 std::string ClassName;
118};
119
120class SetClassTypeRelationshipCommand: public QUndoCommand
121{
122public:
123 SetClassTypeRelationshipCommand ( dunedaq::oks::OksClass* Class, dunedaq::oks::OksRelationship * Relationship, std::string ClassType );
125 void redo();
126 void undo();
127private:
128 std::string ClassName;
130 std::string RelationshipName;
133};
134
135class SetDescriptionRelationshipCommand: public QUndoCommand
136{
137public:
139 std::string Description );
141 void redo();
142 void undo();
143private:
144 std::string ClassName;
146 std::string RelationshipName;
147 std::string NewDescription;
148 std::string OldDescription;
149};
150
167
184
185class SetIsCompositeRelationshipCommand: public QUndoCommand
186{
187public:
190 void redo();
191 void undo();
192private:
193 std::string ClassName;
195 std::string RelationshipName;
198};
199
200class SetIsDependentRelationshipCommand: public QUndoCommand
201{
202public:
205 void redo();
206 void undo();
207private:
208 std::string ClassName;
210 std::string RelationshipName;
213};
214
215class SetIsExclusiveRelationshipCommand: public QUndoCommand
216{
217public:
220 void redo();
221 void undo();
222private:
223 std::string ClassName;
225 std::string RelationshipName;
228};
229
230class AddRelationship: public QUndoCommand
231{
232public:
233 AddRelationship ( dunedaq::oks::OksClass * Class, std::string Name, std::string Description,
234 std::string Type, bool Composite, bool Exclusive, bool Dependent,
238 void redo();
239 void undo();
240private:
241 std::string ClassName;
243 std::string RelationshipName;
245 std::string RelationshipType;
251};
252
276
278class SetMethodImplementationLanguage: public QUndoCommand
279{
280public:
284 std::string Language );
286 void redo();
287 void undo();
288private:
289 std::string ClassName;
290 std::string MethodName;
292 std::string NewLanguage;
293 std::string OldLanguage;
294};
295
296class SetMethodImplementationPrototype: public QUndoCommand
297{
298public:
302 std::string Prototype );
304 void redo();
305 void undo();
306private:
307 std::string ClassName;
308 std::string MethodName;
311 std::string NewPrototype;
312 std::string OldPrototype;
313};
314
315class SetMethodImplementationBody: public QUndoCommand
316{
317public:
320 void redo();
321 void undo();
322private:
323 std::string ClassName;
324 std::string MethodName;
327 std::string NewBody;
328 std::string OldBody;
329};
330
331class AddMethodImplementationComand: public QUndoCommand
332{
333public:
335 dunedaq::oks::OksMethod * Method, std::string Language,
336 std::string Prototype, std::string Body );
338 void redo();
339 void undo();
340private:
341 std::string ClassName;
343 std::string MethodName;
347};
348
349class RemoveMethodImplementationComand: public QUndoCommand
350{
351public:
353 dunedaq::oks::OksMethod * Method, std::string Language,
354 std::string Prototype, std::string Body );
356 void redo();
357 void undo();
358private:
359 std::string ClassName;
361 std::string MethodName;
365};
366
368class SetNameMethodCommand: public QUndoCommand
369{
370public:
371 SetNameMethodCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksMethod * Method, std::string name );
373 void redo();
374 void undo();
375private:
376 std::string ClassName;
378 std::string NewMethodName;
379 std::string OldMethodName;
380};
381
382class SetDescriptionMethodCommand: public QUndoCommand
383{
384public:
385 SetDescriptionMethodCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksMethod * Method, std::string description );
387 void redo();
388 void undo();
389private:
390 std::string ClassName;
392 std::string MethodName;
395};
396
397class AddMethodCommand: public QUndoCommand
398{
399public:
400 AddMethodCommand ( dunedaq::oks::OksClass * Class, std::string name, std::string description );
402 void redo();
403 void undo();
404private:
405 std::string ClassName;
407 std::string SchemaName;
408 std::string SchemaDescription;
409};
410
411class RemoveMethodCommand: public QUndoCommand
412{
413public:
414 RemoveMethodCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksMethod * Method, std::string name,
415 std::string description );
417 void redo();
418 void undo();
419private:
420 std::string ClassName;
422 std::string SchemaName;
423 std::string SchemaDescription;
424};
425
427class SetAttributeNameCommand: public QUndoCommand
428{
429public:
430 SetAttributeNameCommand ( dunedaq::oks::OksClass* Class, dunedaq::oks::OksAttribute * Attribute, std::string NewName );
432 void redo();
433 void undo();
434private:
435 std::string ClassName;
437 std::string NewAttributeName;
438 std::string OldAttributeName;
439};
440
441class SetAttributeDescriptionCommand: public QUndoCommand
442{
443public:
444 SetAttributeDescriptionCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksAttribute * Attribute, std::string NewDescription );
446 void redo();
447 void undo();
448private:
449 std::string ClassName;
451 std::string AttributeName;
454};
455
456class SetAttributeTypeCommand: public QUndoCommand
457{
458public:
459 SetAttributeTypeCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksAttribute * Attribute, std::string NewType );
461 void redo();
462 void undo();
463private:
464 std::string ClassName;
466 std::string AttributeName;
467 std::string NewAttributeType;
468 std::string OldAttributeType;
469};
470
471class SetAttributeRangeCommand: public QUndoCommand
472{
473public:
474 SetAttributeRangeCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksAttribute * Attribute, std::string NewRange );
476 void redo();
477 void undo();
478private:
479 std::string ClassName;
481 std::string AttributeName;
482 std::string NewAttributeRange;
483 std::string OldAttributeRange;
484};
485
500
501class SetAttributeMultiCommand: public QUndoCommand
502{
503public:
504 SetAttributeMultiCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksAttribute * Attribute, bool NewIsMulti );
506 void redo();
507 void undo();
508private:
509 std::string ClassName;
511 std::string AttributeName;
514};
515
516class SetAttributeIsNullCommand: public QUndoCommand
517{
518public:
519 SetAttributeIsNullCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksAttribute * Attribute, bool NewIsNull );
521 void redo();
522 void undo();
523private:
524 std::string ClassName;
526 std::string AttributeName;
529};
530
531class SetAttributeInitialValuesCommand: public QUndoCommand
532{
533public:
534 SetAttributeInitialValuesCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksAttribute * Attribute, std::string NewValues );
536 void redo();
537 void undo();
538private:
539 std::string ClassName;
541 std::string AttributeName;
544};
545
546class AddAttributeCommand: public QUndoCommand
547{
548public:
549 AddAttributeCommand ( dunedaq::oks::OksClass * Class, std::string name, std::string type, bool is_mv,
550 std::string range, std::string init_values, std::string description,
553 void redo();
554 void undo();
555private:
556 std::string ClassName;
558 std::string SchemaName;
559 std::string SchemaType;
561 std::string SchemaRange;
562 std::string SchemaInitValues;
563 std::string SchemaDescription;
566};
567
568class RemoveAttributeCommand: public QUndoCommand
569{
570public:
571 RemoveAttributeCommand ( dunedaq::oks::OksClass * Class, dunedaq::oks::OksAttribute * Attribute, std::string name,
572 std::string type, bool is_mv, std::string range,
573 std::string init_values, std::string description, bool is_null,
576 void redo();
577 void undo();
578private:
579 std::string ClassName;
581 std::string SchemaName;
582 std::string SchemaType;
584 std::string SchemaRange;
585 std::string SchemaInitValues;
586 std::string SchemaDescription;
589};
590
591} // namespace dbse
592
593#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
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:205
OKS method implementation class.
Definition method.hpp:40
OKS method class.
Definition method.hpp:158
Including QT Headers.
Including Qt Headers.
Definition module.cpp:16