1 module as; 2 import as.def; 3 import std..string; 4 public import as.engine; 5 public import as.mod; 6 public import as.func; 7 public import as.context; 8 public import as.tinf; 9 public import as.obj; 10 11 /** 12 Gets the version of the angelscript library 13 */ 14 string getLibraryVersion() { 15 return cast(string)asGetLibraryVersion().fromStringz; 16 } 17 18 /** 19 Gets the library options of the angelscript library 20 */ 21 string getLibraryOptions() { 22 return cast(string)asGetLibraryOptions().fromStringz; 23 } 24 25 /** 26 The type of a message 27 */ 28 enum MessageType { 29 30 /** 31 An info message 32 */ 33 Info = asEMsgType.asMSGTYPE_INFORMATION, 34 35 /** 36 A warning message 37 */ 38 Warning = asEMsgType.asMSGTYPE_WARNING, 39 40 /** 41 An error message 42 */ 43 Error = asEMsgType.asMSGTYPE_ERROR 44 } 45 46 alias MessageCallback = extern(C) void function(void*, const(asSMessageInfo)*); 47 alias NativeMessage = const(asSMessageInfo)*; 48 49 /** 50 Message info 51 */ 52 struct MessageInfo { 53 public: 54 this(const(asSMessageInfo)* info) { 55 this.section = cast(string)info.section.fromStringz; 56 this.row = info.row; 57 this.col = info.col; 58 this.type = cast(MessageType)info.type; 59 this.message = cast(string)info.message.fromStringz; 60 } 61 62 /** 63 The section the message occured at 64 */ 65 string section; 66 67 /** 68 The row the message occured at 69 */ 70 int row; 71 72 /** 73 The column the message occured at 74 */ 75 int col; 76 77 /** 78 The type of the message 79 */ 80 MessageType type; 81 82 /** 83 The message body 84 */ 85 string message; 86 }