コード例 #1
0
ファイル: print.cs プロジェクト: arkanoid1/FakePacketSender
 //#define Sizeof(x)	((int)sizeof(x))
 //#define VOID(p)		((const void*)(p))
 public static void PrintString(TString ts)
 {
     CharPtr s = GetStr(ts);
     uint i, n = ts.tsv.len;
     putchar('"');
     for (i = 0; i < n; i++)
     {
         int c = s[i];
         switch (c)
         {
             case '"': printf("\\\""); break;
             case '\\': printf("\\\\"); break;
             case '\a': printf("\\a"); break;
             case '\b': printf("\\b"); break;
             case '\f': printf("\\f"); break;
             case '\n': printf("\\n"); break;
             case '\r': printf("\\r"); break;
             case '\t': printf("\\t"); break;
             case '\v': printf("\\v"); break;
             default: if (isprint((byte)c))
                     putchar(c);
                 else
                     printf("\\%03u", (byte)c);
                 break;
         }
     }
     putchar('"');
 }
コード例 #2
0
ファイル: ltm.cs プロジェクト: arkanoid1/FakePacketSender
 /*
 ** function to be used with macro "fasttm": optimized for absence of
 ** tag methods
 */
 public static TValue luaT_gettm(Table events, TMS event_, TString ename)
 {
     /*const*/
     TValue tm = luaH_getstr(events, ename);
     LuaAssert(event_ <= TMS.TM_EQ);
     if (TTIsNil(tm))
     {  /* no tag method? */
         events.flags |= (byte)(1 << (int)event_);  /* cache this fact */
         return null;
     }
     else return tm;
 }
コード例 #3
0
 public void setFazenda(TString value)
 {
     //<bucb> setFazenda(TString value)
     //<eucb> setFazenda(TString value)
     this.fazenda = value;
 }
コード例 #4
0
 public void setNome(TString value)
 {
     //<bucb> setNome(TString value)
     //<eucb> setNome(TString value)
     this.nome = value;
 }
コード例 #5
0
 public string Accept(TString type, string fieldName, string tablesName)
 {
     throw new NotImplementedException();
 }
コード例 #6
0
 public override bool Accept(TString type)
 {
     return(true);
 }
コード例 #7
0
ファイル: prods.cs プロジェクト: JamesJustinHarrell/niviok
     public AImport(
         TKeywordImport _keyword_import_,
         TString _string_,
         TNewline _newline_
 )
     {
         SetKeywordImport (_keyword_import_);
         SetString (_string_);
         SetNewline (_newline_);
     }
コード例 #8
0
ファイル: prods.cs プロジェクト: JamesJustinHarrell/niviok
     public ADPrimary(
         TString _string_
 )
     {
         SetString (_string_);
     }
コード例 #9
0
 public string Accept(TString type, string jsonVarName, string fieldName)
 {
     return($"{fieldName} = {jsonVarName}");
 }
コード例 #10
0
ファイル: parser.cs プロジェクト: JamesJustinHarrell/niviok
 public override void CaseTString(TString node)
 {
     index = 42;
 }
コード例 #11
0
 public bool Accept(TString type, TType x, Dictionary <DefTypeBase, bool> y, HashSet <DefTypeBase> z)
 {
     return(true);
 }
コード例 #12
0
 public string Accept(TString type, string bufName, string fieldName)
 {
     return($"{fieldName} = {bufName}.readString();");
 }
コード例 #13
0
 public string Accept(TString type, string byteBufName, string fieldName)
 {
     return($"{byteBufName}.WriteString({fieldName});");
 }
コード例 #14
0
 public string Accept(TString type, string x)
 {
     return($"{x} or \"\"");
 }
コード例 #15
0
ファイル: StringDataCreator.cs プロジェクト: zhangga/luban
 public DType Accept(TString type, string x)
 {
     return(new DString(x));
 }
コード例 #16
0
 public void setId_animal(TString value)
 {
     //<bucb> setId_animal(TString value)
     //<eucb> setId_animal(TString value)
     this.id_animal = value;
 }
コード例 #17
0
 private RequestData(Writeable request)
 {
     fRequestType = new TString(request.GetType().Name);
     fRequest     = request;
 }
コード例 #18
0
 public string Accept(TString type)
 {
     return("bright::String");
 }
コード例 #19
0
ファイル: prods.cs プロジェクト: JamesJustinHarrell/niviok
 internal override void RemoveChild(Node child)
 {
     if ( _keyword_plane_ == child )
     {
     _keyword_plane_ = null;
     return;
     }
     if ( _string_ == child )
     {
     _string_ = null;
     return;
     }
     if ( _newline_ == child )
     {
     _newline_ = null;
     return;
     }
 }
コード例 #20
0
 public static Node hashstr(Table t, TString str)
 {
     return(hashpow2(t, str.tsv.hash));
 }
コード例 #21
0
ファイル: prods.cs プロジェクト: JamesJustinHarrell/niviok
 internal override void RemoveChild(Node child)
 {
     if ( _string_ == child )
     {
     _string_ = null;
     return;
     }
 }
コード例 #22
0
ファイル: lstring.cs プロジェクト: jiaguoxinzhi/KopiLua
 public static int sizestring(TString s)
 {
     return(((int)s.len + 1) * GetUnmanagedSize(typeof(char)));
 }
コード例 #23
0
ファイル: prods.cs プロジェクト: JamesJustinHarrell/niviok
        public void SetString(TString node)
        {
            if(_string_ != null)
            {
            _string_.Parent(null);
            }

            if(node != null)
            {
            if(node.Parent() != null)
            {
                node.Parent().RemoveChild(node);
            }

            node.Parent(this);
            }

            _string_ = node;
        }
コード例 #24
0
 public void ReadFrom(DataReader reader)
 {
     fSessionData    = reader.ReadString("SessionData", SessionDataMaxLength);
     fSessionExpires = reader.ReadDateTime("SessionExpires");
     //TODO: fMemberState = reader.readObject("MemberState", MemberState);
 }
コード例 #25
0
 public override void CaseTString(TString node)
 {
     index = 9;
 }
コード例 #26
0
 public void Accept(TString type, HashSet <DefTypeBase> x)
 {
 }
コード例 #27
0
ファイル: TsDefineTypeName.cs プロジェクト: zhangga/luban
 public string Accept(TString type)
 {
     return("string");
 }
コード例 #28
0
ファイル: CollectGoImport.cs プロジェクト: zhangga/luban
 public void Accept(TString type, HashSet <string> x)
 {
 }
コード例 #29
0
 public void setRaça(TString value)
 {
     //<bucb> setRaça(TString value)
     //<eucb> setRaça(TString value)
     this.raça = value;
 }
コード例 #30
0
 public DType Accept(TString type, JsonElement x, DefAssembly ass)
 {
     return(new DString(x.GetString()));
 }
コード例 #31
0
 public void setSexo(TString value)
 {
     //<bucb> setSexo(TString value)
     //<eucb> setSexo(TString value)
     this.sexo = value;
 }
コード例 #32
0
 public void ReadFrom(DataReader reader)
 {
     fStatusCode    = (StatusCode)reader.ReadInt("StatusCode").Value;
     fStatusMessage = reader.ReadString("StatusMessage", StatusMessageMaxLength);
     fResponseData  = (ResponseData)reader.ReadObject("ResponseData", ResponseData.CtorDataReader);
 }
コード例 #33
0
 /// <summary>
 /// The method that represents the 'read' function in the language.
 /// Reads in a string and converts it into the most suitable TType.
 /// If the string cannot be converted, it just returns the string as a TString.
 /// </summary>
 /// <param name="interpreter">The interpreter that the method is being called from.</param>
 /// <param name="args">The arguments being passed to the function as a TArgumentList.</param>
 /// <returns>An TType of the type that the entered string represents best.</returns>
 public static TType Read(Interpreter interpreter, TArgumentList args)
 {
     // Read in a string and convert it to a suitable TType with TType.Parse.
     string str = System.Console.ReadLine();
     TType value = TType.Parse(interpreter, str);
     if (value is TException) value = new TString(str); // If the string can't be parsed, return it as a TString
     return value;
 }
コード例 #34
0
ファイル: prods.cs プロジェクト: JamesJustinHarrell/niviok
     public APlanereference(
         TKeywordPlane _keyword_plane_,
         TString _string_,
         TNewline _newline_
 )
     {
         SetKeywordPlane (_keyword_plane_);
         SetString (_string_);
         SetNewline (_newline_);
     }
コード例 #35
0
ファイル: analysis.cs プロジェクト: JamesJustinHarrell/niviok
 public virtual void CaseTString(TString node)
 {
     DefaultCase(node);
 }
コード例 #36
0
 public string Accept(TString type, string json, string field)
 {
     return(DefaultSave(json, field));
 }