当前位置: 首页>>代码示例>>C++>>正文


C++ U_STRING_TO_TRACE函数代码示例

本文整理汇总了C++中U_STRING_TO_TRACE函数的典型用法代码示例。如果您正苦于以下问题:C++ U_STRING_TO_TRACE函数的具体用法?C++ U_STRING_TO_TRACE怎么用?C++ U_STRING_TO_TRACE使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了U_STRING_TO_TRACE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: U_TRACE

void OtpAuthToken::add(const UString& name_, const UString& value_)
{
   U_TRACE(5, "OtpAuthToken::add(%.*S,%.*S)", U_STRING_TO_TRACE(name_), U_STRING_TO_TRACE(value_))

   hp.push_back(name_);
   hp.push_back(value_);
}
开发者ID:fast01,项目名称:ULib,代码行数:7,代码来源:OtpAuthToken.cpp

示例2: print

static int print(UStringRep* key, UStringRep* data)
{
   U_TRACE(5, "::print(%.*S,%.*S)", U_STRING_TO_TRACE(*key), U_STRING_TO_TRACE(*data))

   cout << UString(key) << "->" << UString(data) << endl;

   return 1;
}
开发者ID:fast01,项目名称:ULib,代码行数:8,代码来源:test_rdb.cpp

示例3: U_TRACE

HttpOtpPostLogin::HttpOtpPostLogin(const char* buf, unsigned len, const UString& user_field,
                                   const UString& pin_field, const UString& token_field, const UString& passwd_field,
                                   const UString& cf_field, HttpHeader& header)
{
   U_TRACE(5, "HttpOtpPostLogin::HttpOtpPostLogin(%.*S,%u,%.*S,%.*S,%.*S,%.*S,%p)", len, buf, len,
                     U_STRING_TO_TRACE(user_field), U_STRING_TO_TRACE(pin_field), U_STRING_TO_TRACE(token_field),
                     U_STRING_TO_TRACE(passwd_field), U_STRING_TO_TRACE(cf_field), &header)

   HttpField* f = header.find(U_STRING_FROM_CONSTANT("Content-Type"));

   U_INTERNAL_ASSERT_POINTER(f)

   U_INTERNAL_ASSERT(f->value.find("application/x-www-form-urlencoded") != unsigned(-1))

   buffer.assign(buf, len);

   (void) U_VEC_SPLIT(vec, buffer, "=&"); // "user=stefano+casazza&pin=12345&token=autorizzativo"

   unsigned i = 0;

   while (i < vec.size())
      {
      if (vec[i] == user_field)
         {
         U_STR_RESERVE(user, 64);

         Url::decode(vec[i+1], user);
         }
      else if (vec[i] == pin_field)
         {
         U_STR_RESERVE(pin, 64);

         Url::decode(vec[i+1], pin);
         }
      else if (vec[i] == token_field)
         {
         U_STR_RESERVE(token, 64);

         Url::decode(vec[i+1], token);
         }
      else if (vec[i] == passwd_field)
         {
         U_STR_RESERVE(passwd, 64);

         Url::decode(vec[i+1], passwd);
         }
      else if (vec[i] == cf_field)
         {
         U_STR_RESERVE(cf, 64);

         Url::decode(vec[i+1], cf);
         }

      i += 2;
      }
}
开发者ID:alepharchives,项目名称:ULib,代码行数:56,代码来源:HttpOtpPostLogin.cpp

示例4: U_TRACE

void HttpLocation::stringify(UString& field)
{
   U_TRACE(5, "HttpLocation::stringify(%.*S)", U_STRING_TO_TRACE(field))

   field += name;
   field.append(U_CONSTANT_TO_PARAM(": "));
   field += url;
   field.append(U_CONSTANT_TO_PARAM("\r\n"));

   U_INTERNAL_DUMP("field = %.*S", U_STRING_TO_TRACE(field))
}
开发者ID:alepharchives,项目名称:ULib,代码行数:11,代码来源:HttpLocation.cpp

示例5: reportEntry

    static bool reportEntry(const UString& elem)
    {
        U_TRACE(5, "Application::reportEntry(%.*S)", U_STRING_TO_TRACE(elem))

        UString tmp(U_CAPACITY);

        UXMLEscape::encode(elem, tmp);

        (void) sprintf(buffer, form, U_STRING_TO_TRACE(tmp));

        std::cout << buffer;

        U_RETURN(false);
    }
开发者ID:prejr-dev,项目名称:ULib,代码行数:14,代码来源:PEC_report_virus.cpp

示例6: U_TRACE

void HttpRequestHeader::stringify(UString& field)
{
   U_TRACE(5, "HttpRequestHeader::stringify(%.*S)", U_STRING_TO_TRACE(field))

   field += method;
   field.append(U_CONSTANT_TO_PARAM(" "));
   field += url;
   field.append(U_CONSTANT_TO_PARAM(" "));
   field += httpver;
   field.append(U_CONSTANT_TO_PARAM("\r\n"));

   HttpHeader::stringify(field);

   U_INTERNAL_DUMP("field = %.*S", U_STRING_TO_TRACE(field))
}
开发者ID:alepharchives,项目名称:ULib,代码行数:15,代码来源:HttpRequestHeader.cpp

示例7: U_TRACE

void HttpResponseHeader::stringify(UString& field)
{
   U_TRACE(5, "HttpResponseHeader::stringify(%.*S)", U_STRING_TO_TRACE(field))

   field += httpver;
   field.append(U_CONSTANT_TO_PARAM(" "));
   field += status;
   field.append(U_CONSTANT_TO_PARAM(" "));
   field += reason;
   field.append(U_CONSTANT_TO_PARAM("\r\n"));

   HttpHeader::stringify(field);

   U_INTERNAL_DUMP("field = %.*S", U_STRING_TO_TRACE(field))
}
开发者ID:alepharchives,项目名称:ULib,代码行数:15,代码来源:HttpResponseHeader.cpp

示例8: run

   void run(int argc, char* argv[], char* env[])
      {
      U_TRACE(5, "Application::run(%d,%p,%p)", argc, argv, env)

      Action::run(argc, argv, env);

      // read stdin and scanf

      Action::processInputData(5);

      // --------------------------------------------------------------------------------------------------------------
      // configuration parameters
      // --------------------------------------------------------------------------------------------------------------
      // ARCHIVE_TEMPLATE                    printf form to output request of archive
      // ELECTRONIC_ARCHIVATION_SERVICE_URL  url to do request of archive
      // --------------------------------------------------------------------------------------------------------------

      UString arch_tmpl = UFile::contentOf(cfg[U_STRING_FROM_CONSTANT("ARCHIVE_TEMPLATE")]),
              url       =                  cfg[U_STRING_FROM_CONSTANT("ELECTRONIC_ARCHIVATION_SERVICE_URL")];

      UString body(arch_tmpl.size() + request_decoded.size() + (u__strlen(uid, __PRETTY_FUNCTION__) * 3) + 100U);

      body.snprintf(arch_tmpl.data(), uid, uid, uid, U_STRING_TO_TRACE(request_decoded));

      bool ok = Action::sendHttpPostRequest(url, body, "multipart/form-data; boundary=4MYWPDUi9kH5-ipE_f6CiZXFFn4SaQQOj", "OK") && Action::sendEmail();

      Action::writeToSTDOUT(ok, true);
      }
开发者ID:fast01,项目名称:ULib,代码行数:28,代码来源:production.cpp

示例9: buildFilenameListFrom

   static void buildFilenameListFrom(UVector<UString>& vec, const UString& arg)
      {
      U_TRACE(5, "Application::buildFilenameListFrom(%p,%.*S)", &vec, U_STRING_TO_TRACE(arg))

      uint32_t pos;
      UTokenizer t(arg);
      UString dir, filename, filter;

      while (t.next(filename, ','))
         {
         if (filename.find_first_of("?*", 0, 2) == U_NOT_FOUND) vec.push(filename);
         else
            {
            pos = filename.find_last_of('/');

            U_INTERNAL_DUMP("pos = %u", pos)

            if (pos == U_NOT_FOUND)
               {
               UDirWalk dirwalk(0, U_STRING_TO_PARAM(filename));

               (void) dirwalk.walk(vec);
               }
            else
               {
               dir    = filename.substr(0U, pos);
               filter = filename.substr(pos + 1);

               UDirWalk dirwalk(dir, U_STRING_TO_PARAM(filter));

               (void) dirwalk.walk(vec);
               }
            }
         }
      }
开发者ID:fast01,项目名称:ULib,代码行数:35,代码来源:update.cpp

示例10: U_TRACE

X509_REQ* UPKCS10::readPKCS10(const UString& x, const char* format)
{
   U_TRACE(1, "UPKCS10::readPKCS10(%.*S,%S)", U_STRING_TO_TRACE(x), format)

   BIO* in;
   UString tmp        = x;
   X509_REQ* _request = 0;

   if (format == 0) format = (x.isBinary() ? "DER" : "PEM");

   if (U_STREQ(format, "PEM") &&
       U_STRNCMP(x.data(), "-----BEGIN CERTIFICATE REQUEST-----"))
      {
      unsigned length = x.size();

      UString buffer(length);

      if (UBase64::decode(x.data(), length, buffer) == false) goto next;

      tmp    = buffer;
      format = "DER";
      }

next:
   in = (BIO*) U_SYSCALL(BIO_new_mem_buf, "%p,%d", U_STRING_TO_PARAM(tmp));

   _request = (X509_REQ*) (U_STREQ(format, "PEM") ? U_SYSCALL(PEM_read_bio_X509_REQ, "%p,%p,%p,%p", in, 0, 0, 0)
                                                  : U_SYSCALL(d2i_X509_REQ_bio,      "%p,%p",       in, 0));

   (void) U_SYSCALL(BIO_free, "%p", in);

   U_RETURN_POINTER(_request, X509_REQ);
}
开发者ID:wladitavar,项目名称:ULib,代码行数:33,代码来源:pkcs10.cpp

示例11: U_TRACE

bool UTranformInclC14N::execute(UString& data)
{
   U_TRACE(0, "UTranformInclC14N::execute(%.*S)", U_STRING_TO_TRACE(data))

   data = UXML2Document::xmlC14N(data);

   U_RETURN(true);
}
开发者ID:stefanocasazza,项目名称:ULib,代码行数:8,代码来源:transform.cpp

示例12: U_TRACE

void UHexDump::encode(const unsigned char* s, uint32_t n, UString& buffer)
{
   U_TRACE(0, "UHexDump::encode(%.*S,%u,%.*S)", n, s, n, U_STRING_TO_TRACE(buffer))

   uint32_t pos = u_hexdump_encode(s, n, (unsigned char*)buffer.data());

   buffer.size_adjust(pos);
}
开发者ID:alepharchives,项目名称:ULib,代码行数:8,代码来源:hexdump.cpp

示例13: U_TRACE

void UTokenizer::setData(const UString& data)
{
   U_TRACE(0, "UTokenizer::setData(%.*S)", U_STRING_TO_TRACE(data))

   str = data;
   s   = data.data();
   end = s + data.size();
}
开发者ID:wladitavar,项目名称:ULib,代码行数:8,代码来源:tokenizer.cpp

示例14: data

UFileConfig::UFileConfig(const UString& _data, bool _preprocessing) : data(_data)
{
   U_TRACE_REGISTER_OBJECT(0, UFileConfig, "%.*S,%b", U_STRING_TO_TRACE(_data), _preprocessing)

   init();

   preprocessing = _preprocessing;
}
开发者ID:ksengottuvel,项目名称:ULib,代码行数:8,代码来源:file_config.cpp

示例15: U_TRACE

void Url::set(const UString& x)
{
   U_TRACE(0, "Url::set(%.*S)", U_STRING_TO_TRACE(x))

   url = x;

   findpos();
}
开发者ID:ksengottuvel,项目名称:ULib,代码行数:8,代码来源:url.cpp


注:本文中的U_STRING_TO_TRACE函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。