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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
#ifndef _UMLBASESTATEACTION_H
#define _UMLBASESTATEACTION_H
#include "UmlItem.h"
#include "anItemKind.h"
#include <qcstring.h>
class UmlStateAction;
class UmlState;
class UmlBaseStateAction : public UmlItem {
public:
// returns a new state action created under 'parent'
//
// In case it cannot be created ('parent' cannot contain it etc ...)
// return 0 in C++ and produce a RuntimeException in Java
static UmlStateAction * create(UmlState * parent);
// returns the kind of the item
virtual anItemKind kind();
protected:
// the constructor, do not call it yourself !!!!!!!!!!
UmlBaseStateAction(void * id, const QCString & s) : UmlItem(id, s) {
}
public:
// return the expression in OCL
const QCString & expression();
// set the expression in OCL
//
// On error return FALSE in C++, produce a RuntimeException in Java
bool set_Expression(const char * s);
#ifdef WITHCPP
// return the expression in C++
const QCString & cppExpression();
// set the expression in C++
//
// On error return FALSE in C++, produce a RuntimeException in Java
bool set_CppExpression(const char * s);
#endif
#ifdef WITHJAVA
// return the expression in Java
const QCString & javaExpression();
// set the expression in Java
//
// On error return FALSE in C++, produce a RuntimeException in Java
bool set_JavaExpression(const char * s);
#endif
// to unload the object to free memory, it will be reloaded automatically
// if needed. Recursively done for the sub items if 'rec' is TRUE.
//
// if 'del' is true the sub items are deleted in C++, and removed from the
// internal dictionnary in C++ and Java (to allow it to be garbaged),
// you will have to call Children() to re-access to them
virtual void unload(bool = FALSE, bool = FALSE);
private:
QCString _uml;
#ifdef WITHCPP
QCString _cpp;
#endif
#ifdef WITHJAVA
QCString _java;
#endif
protected:
virtual void read_uml_();
#ifdef WITHCPP
virtual void read_cpp_();
#endif
#ifdef WITHJAVA
virtual void read_java_();
#endif
};
#endif
|