diff options
Diffstat (limited to 'fluid/nodes/Function_Node.h')
| -rw-r--r-- | fluid/nodes/Function_Node.h | 194 |
1 files changed, 97 insertions, 97 deletions
diff --git a/fluid/nodes/Function_Node.h b/fluid/nodes/Function_Node.h index 87664e317..cc1444a26 100644 --- a/fluid/nodes/Function_Node.h +++ b/fluid/nodes/Function_Node.h @@ -59,20 +59,20 @@ public: Function_Node(); ~Function_Node(); - Node *make(Strategy strategy) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override; - void open() override; + Node *make(Strategy strategy); + void write_code1(fld::io::Code_Writer& f); + void write_code2(fld::io::Code_Writer& f); + void open(); int ismain() {return name_ == 0;} - const char *type_name() override {return "Function";} - const char *title() override { return name() ? name() : "main()"; } - int can_have_children() const override {return 1;} - int is_code_block() const override {return 1;} - int is_public() const override; - Type type() const override { return FLD_NODE_TYPE_Function; } - bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Function) ? true : super::is_a(inType); } - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; + const char *type_name() {return "Function";} + const char *title() { return name() ? name() : "main()"; } + int can_have_children() const {return 1;} + int is_code_block() const {return 1;} + int is_public() const; + Type type() const { return FLD_NODE_TYPE_Function; } + bool is_a(Type inType) const { return (inType==FLD_NODE_TYPE_Function) ? true : super::is_a(inType); } + void write_properties(fld::io::Project_Writer &f); + void read_property(fld::io::Project_Reader &f, const char *); int has_signature(const char *, const char*) const; const char *return_type() const { return return_type_ ? return_type_ : ""; } void return_type(const char *t) { storestring(t, return_type_); } @@ -98,18 +98,18 @@ private: public: Code_Node() = default; - ~Code_Node() override = default; - - Node *make(Strategy strategy) override; - void write(fld::io::Project_Writer &f) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override { } - void open() override; - const char *type_name() override {return "code";} - int is_code_block() const override {return 0;} - Type type() const override { return FLD_NODE_TYPE_Code; } - bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Code) ? true : super::is_a(inType); } - int is_public() const override { return -1; } + ~Code_Node() = default; + + Node *make(Strategy strategy); + void write(fld::io::Project_Writer &f); + void write_code1(fld::io::Code_Writer& f); + void write_code2(fld::io::Code_Writer& f) { } + void open(); + const char *type_name() {return "code";} + int is_code_block() const {return 0;} + Type type() const { return FLD_NODE_TYPE_Code; } + bool is_a(Type inType) const { return (inType==FLD_NODE_TYPE_Code) ? true : super::is_a(inType); } + int is_public() const { return -1; } int is_editing(); int reap_editor(); int handle_editor_changes(); @@ -136,18 +136,18 @@ public: CodeBlock_Node(); ~CodeBlock_Node(); - Node *make(Strategy strategy) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override; - void open() override; - const char *type_name() override {return "codeblock";} - int is_code_block() const override {return 1;} - int can_have_children() const override {return 1;} - int is_public() const override { return -1; } - Type type() const override { return FLD_NODE_TYPE_CodeBlock; } - bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_CodeBlock) ? true : super::is_a(inType); } - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; + Node *make(Strategy strategy); + void write_code1(fld::io::Code_Writer& f); + void write_code2(fld::io::Code_Writer& f); + void open(); + const char *type_name() {return "codeblock";} + int is_code_block() const {return 1;} + int can_have_children() const {return 1;} + int is_public() const { return -1; } + Type type() const { return FLD_NODE_TYPE_CodeBlock; } + bool is_a(Type inType) const { return (inType==FLD_NODE_TYPE_CodeBlock) ? true : super::is_a(inType); } + void write_properties(fld::io::Project_Writer &f); + void read_property(fld::io::Project_Reader &f, const char *); const char *end_code() const { return end_code_ ? end_code_ : ""; } void end_code(const char *c) { storestring(c, end_code_); } }; @@ -166,18 +166,18 @@ protected: public: Decl_Node() = default; - ~Decl_Node() override = default; - - Node *make(Strategy strategy) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override { } - void open() override; - const char *type_name() override {return "decl";} - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; - int is_public() const override; - Type type() const override { return FLD_NODE_TYPE_Decl; } - bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Decl) ? true : super::is_a(inType); } + ~Decl_Node() = default; + + Node *make(Strategy strategy); + void write_code1(fld::io::Code_Writer& f); + void write_code2(fld::io::Code_Writer& f) { } + void open(); + const char *type_name() {return "decl";} + void write_properties(fld::io::Project_Writer &f); + void read_property(fld::io::Project_Reader &f, const char *); + int is_public() const; + Type type() const { return FLD_NODE_TYPE_Decl; } + bool is_a(Type inType) const { return (inType==FLD_NODE_TYPE_Decl) ? true : super::is_a(inType); } char visibility() { return public_; } void visibility(char v) { public_ = v; } char output_file() { return (public_&1)|((static_&1)<<1); } @@ -200,15 +200,15 @@ public: Data_Node(); ~Data_Node(); - Node *make(Strategy strategy) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override {} - void open() override; - const char *type_name() override {return "data";} - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; - Type type() const override { return FLD_NODE_TYPE_Data; } - bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Data) ? true : super::is_a(inType); } + Node *make(Strategy strategy); + void write_code1(fld::io::Code_Writer& f); + void write_code2(fld::io::Code_Writer& f) {} + void open(); + const char *type_name() {return "data";} + void write_properties(fld::io::Project_Writer &f); + void read_property(fld::io::Project_Reader &f, const char *); + Type type() const { return FLD_NODE_TYPE_Data; } + bool is_a(Type inType) const { return (inType==FLD_NODE_TYPE_Data) ? true : super::is_a(inType); } void filename(const char *fn) { storestring(fn, filename_); } const char *filename() const { return filename_ ? filename_ : ""; } int output_format() { return output_format_; } @@ -237,20 +237,20 @@ public: DeclBlock_Node(); ~DeclBlock_Node(); - Node *make(Strategy strategy) override; - void write_static(fld::io::Code_Writer& f) override; - void write_static_after(fld::io::Code_Writer& f) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override; - void open() override; - const char *type_name() override {return "declblock";} - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; - int can_have_children() const override {return 1;} - int is_decl_block() const override {return 1;} - int is_public() const override; - Type type() const override { return FLD_NODE_TYPE_DeclBlock; } - bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_DeclBlock) ? true : super::is_a(inType); } + Node *make(Strategy strategy); + void write_static(fld::io::Code_Writer& f); + void write_static_after(fld::io::Code_Writer& f); + void write_code1(fld::io::Code_Writer& f); + void write_code2(fld::io::Code_Writer& f); + void open(); + const char *type_name() {return "declblock";} + void write_properties(fld::io::Project_Writer &f); + void read_property(fld::io::Project_Reader &f, const char *); + int can_have_children() const {return 1;} + int is_decl_block() const {return 1;} + int is_public() const; + Type type() const { return FLD_NODE_TYPE_DeclBlock; } + bool is_a(Type inType) const { return (inType==FLD_NODE_TYPE_DeclBlock) ? true : super::is_a(inType); } const char *end_code() const { return end_code_ ? end_code_ : ""; } void end_code(const char *p) { storestring(p, end_code_); } int write_map() { return write_map_; } @@ -272,18 +272,18 @@ private: public: Comment_Node() = default; - ~Comment_Node() override = default; - - Node *make(Strategy strategy) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override { } - void open() override; - const char *type_name() override {return "comment";} - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; - int is_public() const override { return 1; } - Type type() const override { return FLD_NODE_TYPE_Comment; } - bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Comment) ? true : super::is_a(inType); } + ~Comment_Node() = default; + + Node *make(Strategy strategy); + void write_code1(fld::io::Code_Writer& f); + void write_code2(fld::io::Code_Writer& f) { } + void open(); + const char *type_name() {return "comment";} + void write_properties(fld::io::Project_Writer &f); + void read_property(fld::io::Project_Reader &f, const char *); + int is_public() const { return 1; } + Type type() const { return FLD_NODE_TYPE_Comment; } + bool is_a(Type inType) const { return (inType==FLD_NODE_TYPE_Comment) ? true : super::is_a(inType); } bool in_h() { return in_h_; } void in_h(bool v) { in_h_ = v; } bool in_c() { return in_c_; } @@ -311,19 +311,19 @@ public: char write_public_state; // true when public: has been printed Class_Node* parent_class; // save class if nested - Node *make(Strategy strategy) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override; - void open() override; - const char *type_name() override {return "class";} - int can_have_children() const override {return 1;} - int is_decl_block() const override {return 1;} - int is_class() const override {return 1;} - int is_public() const override; - Type type() const override { return FLD_NODE_TYPE_Class; } - bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Class) ? true : super::is_a(inType); } - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; + Node *make(Strategy strategy); + void write_code1(fld::io::Code_Writer& f); + void write_code2(fld::io::Code_Writer& f); + void open(); + const char *type_name() {return "class";} + int can_have_children() const {return 1;} + int is_decl_block() const {return 1;} + int is_class() const {return 1;} + int is_public() const; + Type type() const { return FLD_NODE_TYPE_Class; } + bool is_a(Type inType) const { return (inType==FLD_NODE_TYPE_Class) ? true : super::is_a(inType); } + void write_properties(fld::io::Project_Writer &f); + void read_property(fld::io::Project_Reader &f, const char *); /** Get base class access and name. */ const char *base_class() const { return base_class_ ? base_class_ : ""; } |
