Exemple #1
0
 //#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('"');
 }
Exemple #2
0
 /*
 ** 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;
 }
Exemple #3
0
 public void setFazenda(TString value)
 {
     //<bucb> setFazenda(TString value)
     //<eucb> setFazenda(TString value)
     this.fazenda = value;
 }
Exemple #4
0
 public void setNome(TString value)
 {
     //<bucb> setNome(TString value)
     //<eucb> setNome(TString value)
     this.nome = value;
 }
 public string Accept(TString type, string fieldName, string tablesName)
 {
     throw new NotImplementedException();
 }
 public override bool Accept(TString type)
 {
     return(true);
 }
Exemple #7
0
     public AImport(
         TKeywordImport _keyword_import_,
         TString _string_,
         TNewline _newline_
 )
     {
         SetKeywordImport (_keyword_import_);
         SetString (_string_);
         SetNewline (_newline_);
     }
Exemple #8
0
     public ADPrimary(
         TString _string_
 )
     {
         SetString (_string_);
     }
Exemple #9
0
 public string Accept(TString type, string jsonVarName, string fieldName)
 {
     return($"{fieldName} = {jsonVarName}");
 }
Exemple #10
0
 public override void CaseTString(TString node)
 {
     index = 42;
 }
 public bool Accept(TString type, TType x, Dictionary <DefTypeBase, bool> y, HashSet <DefTypeBase> z)
 {
     return(true);
 }
Exemple #12
0
 public string Accept(TString type, string bufName, string fieldName)
 {
     return($"{fieldName} = {bufName}.readString();");
 }
Exemple #13
0
 public string Accept(TString type, string byteBufName, string fieldName)
 {
     return($"{byteBufName}.WriteString({fieldName});");
 }
Exemple #14
0
 public string Accept(TString type, string x)
 {
     return($"{x} or \"\"");
 }
Exemple #15
0
 public DType Accept(TString type, string x)
 {
     return(new DString(x));
 }
Exemple #16
0
 public void setId_animal(TString value)
 {
     //<bucb> setId_animal(TString value)
     //<eucb> setId_animal(TString value)
     this.id_animal = value;
 }
Exemple #17
0
 private RequestData(Writeable request)
 {
     fRequestType = new TString(request.GetType().Name);
     fRequest     = request;
 }
 public string Accept(TString type)
 {
     return("bright::String");
 }
Exemple #19
0
 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;
     }
 }
Exemple #20
0
 public static Node hashstr(Table t, TString str)
 {
     return(hashpow2(t, str.tsv.hash));
 }
Exemple #21
0
 internal override void RemoveChild(Node child)
 {
     if ( _string_ == child )
     {
     _string_ = null;
     return;
     }
 }
Exemple #22
0
 public static int sizestring(TString s)
 {
     return(((int)s.len + 1) * GetUnmanagedSize(typeof(char)));
 }
Exemple #23
0
        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;
        }
Exemple #24
0
 public void ReadFrom(DataReader reader)
 {
     fSessionData    = reader.ReadString("SessionData", SessionDataMaxLength);
     fSessionExpires = reader.ReadDateTime("SessionExpires");
     //TODO: fMemberState = reader.readObject("MemberState", MemberState);
 }
Exemple #25
0
 public override void CaseTString(TString node)
 {
     index = 9;
 }
 public void Accept(TString type, HashSet <DefTypeBase> x)
 {
 }
Exemple #27
0
 public string Accept(TString type)
 {
     return("string");
 }
Exemple #28
0
 public void Accept(TString type, HashSet <string> x)
 {
 }
Exemple #29
0
 public void setRaça(TString value)
 {
     //<bucb> setRaça(TString value)
     //<eucb> setRaça(TString value)
     this.raça = value;
 }
Exemple #30
0
 public DType Accept(TString type, JsonElement x, DefAssembly ass)
 {
     return(new DString(x.GetString()));
 }
Exemple #31
0
 public void setSexo(TString value)
 {
     //<bucb> setSexo(TString value)
     //<eucb> setSexo(TString value)
     this.sexo = value;
 }
Exemple #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);
 }
 /// <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;
 }
Exemple #34
0
     public APlanereference(
         TKeywordPlane _keyword_plane_,
         TString _string_,
         TNewline _newline_
 )
     {
         SetKeywordPlane (_keyword_plane_);
         SetString (_string_);
         SetNewline (_newline_);
     }
Exemple #35
0
 public virtual void CaseTString(TString node)
 {
     DefaultCase(node);
 }
Exemple #36
0
 public string Accept(TString type, string json, string field)
 {
     return(DefaultSave(json, field));
 }