1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef USCRIPT_BASIC_INSTRUCTION_H 16 #define USCRIPT_BASIC_INSTRUCTION_H 17 18 #include "script_instruction.h" 19 20 namespace BasicInstruction { 21 class UScriptInstructionAbort : public Uscript::UScriptInstruction { 22 public: UScriptInstructionAbort()23 UScriptInstructionAbort() {} ~UScriptInstructionAbort()24 virtual ~UScriptInstructionAbort() {} 25 int32_t Execute(Uscript::UScriptEnv &env, Uscript::UScriptContext &context) override; 26 }; 27 28 class UScriptInstructionAssert : public Uscript::UScriptInstruction { 29 public: UScriptInstructionAssert()30 UScriptInstructionAssert() {} ~UScriptInstructionAssert()31 virtual ~UScriptInstructionAssert() {} 32 int32_t Execute(Uscript::UScriptEnv &env, Uscript::UScriptContext &context) override; 33 }; 34 35 class UScriptInstructionSleep : public Uscript::UScriptInstruction { 36 public: UScriptInstructionSleep()37 UScriptInstructionSleep() {} ~UScriptInstructionSleep()38 virtual ~UScriptInstructionSleep() {} 39 int32_t Execute(Uscript::UScriptEnv &env, Uscript::UScriptContext &context) override; 40 }; 41 class UScriptInstructionStdout : public Uscript::UScriptInstruction { 42 public: UScriptInstructionStdout()43 UScriptInstructionStdout() {} ~UScriptInstructionStdout()44 virtual ~UScriptInstructionStdout() {} 45 int32_t Execute(Uscript::UScriptEnv &env, Uscript::UScriptContext &context) override; 46 }; 47 48 class UScriptInstructionConcat : public Uscript::UScriptInstruction { 49 public: UScriptInstructionConcat()50 UScriptInstructionConcat() {} ~UScriptInstructionConcat()51 virtual ~UScriptInstructionConcat() {} 52 int32_t Execute(Uscript::UScriptEnv &env, Uscript::UScriptContext &context) override; 53 }; 54 55 class UScriptInstructionIsSubString : public Uscript::UScriptInstruction { 56 public: UScriptInstructionIsSubString()57 UScriptInstructionIsSubString() {} ~UScriptInstructionIsSubString()58 virtual ~UScriptInstructionIsSubString() {} 59 int32_t Execute(Uscript::UScriptEnv &env, Uscript::UScriptContext &context) override; 60 }; 61 62 class UScriptInstructionDeleteFile : public Uscript::UScriptInstruction { 63 public: UScriptInstructionDeleteFile()64 UScriptInstructionDeleteFile() {} ~UScriptInstructionDeleteFile()65 virtual ~UScriptInstructionDeleteFile() {} 66 int32_t Execute(Uscript::UScriptEnv &env, Uscript::UScriptContext &context) override; 67 }; 68 69 class UScriptInstructionDeleteDir : public Uscript::UScriptInstruction { 70 public: UScriptInstructionDeleteDir()71 UScriptInstructionDeleteDir() {} ~UScriptInstructionDeleteDir()72 virtual ~UScriptInstructionDeleteDir() {} 73 int32_t Execute(Uscript::UScriptEnv &env, Uscript::UScriptContext &context) override; 74 }; 75 76 77 } // namespace BasicInstruction 78 #endif // USCRIPT_BASIC_INSTRUCTION_H 79