本文整理汇总了C++中StrUni::Append方法的典型用法代码示例。如果您正苦于以下问题:C++ StrUni::Append方法的具体用法?C++ StrUni::Append怎么用?C++ StrUni::Append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StrUni
的用法示例。
在下文中一共展示了StrUni::Append方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sizeof
DEFINE_THIS_FILE
#if !WIN32
#include <netdb.h>
#include <unistd.h>
#include <sys/wait.h>
#include <time.h>
#endif
/*----------------------------------------------------------------------------------------------
Get the name of the local FieldWorks database server.
----------------------------------------------------------------------------------------------*/
const wchar * SilUtil::LocalServerName()
{
static StrUni s_stuLocalServer;
if (!s_stuLocalServer.Length())
{
#if WIN32
wchar rgchComputer[MAX_COMPUTERNAME_LENGTH + 1];
DWORD cch = MAX_COMPUTERNAME_LENGTH + 1;
::GetComputerNameW(rgchComputer, &cch);
s_stuLocalServer.Format(L"%s\\SILFW", rgchComputer);
#else
const int max_compname_len = 4096; // TODOLinix this should be set to the maximun host length name
char bufHost[max_compname_len + 1];
size_t len = sizeof(bufHost);
if(gethostname(bufHost, len) != 0)
{
hostent * host = gethostbyname(bufHost);
s_stuLocalServer = host->h_name;
s_stuLocalServer.Append("/SILFW");
}
else
{
s_stuLocalServer.Format(L"%S", bufHost);
s_stuLocalServer.Append("/SILFW");
}
#endif //WIN32
}
return s_stuLocalServer.Chars();
}
示例2: FindBreakPoint
//.........这里部分代码省略.........
int avgCharWidth = *pdxWidth / (grIchwMin + grIchwLimSeg);
// we use 30000 here, because avgCharWidth is just an estimate,
// this gives us some padding to ensure that the resulting segment
// is less than the limit
grIchwLim = grIchwMin + (30000 / avgCharWidth);
pgrseg = new LineFillSegment(&font, pgts, &layout,
grIchwMin, grIchwLim,
(float)dxMaxWidth, fBacktracking);
// reset variables for new segment
gr::Font & fontSeg = pgrseg->getFont();
pfontSeg = dynamic_cast<WinFont *>(&fontSeg);
pfontSeg->replaceDC(hdc);
*pest = pgrseg->segmentTermination();
if (*pest != kestNothingFit)
{
*pdichwLimSeg = pgts->GrToVwOffset(pgrseg->stopCharacter() - pgrseg->startCharacter());
*pdxWidth = gr::GrEngine::RoundFloat(pgrseg->advanceWidth());
}
}
}
strmLog.close();
}
catch (FontException & fexptn)
{
// Error in initializing the font.
FontErrorCode ferr = fexptn.errorCode;
LgCharRenderProps chrp;
int ichwMinBogus, ichwLimBogus;
pgts->GetCharProps(ichwMin, &chrp, &ichwMinBogus, &ichwLimBogus);
StrUni stuMsg = L"Error in initializing Graphite font ";
stuMsg.Append(chrp.szFaceName);
stuMsg.Append(": ");
std::wstring stuErrMsg = FontLoadErrorDescription(ferr, 0, 0, &hr);
stuMsg.Append(stuErrMsg.c_str());
StackDumper::RecordError(IID_IRenderEngine, stuMsg, L"SIL.Graphite.FwGrEngine", 0, L"");
return hr;
}
// if we are at the end of the requested range, but the text source still has more text in
// it, Graphite will determine that the break was bad or okay, even though it broke
// because there was no more text, so we go ahead and change the reason here to no more text
if (ichwMin + *pdichwLimSeg == ichwLim && (*pest == kestOkayBreak || *pest == kestBadBreak))
*pest = kestNoMore;
bool fError = false;
std::pair<GlyphIterator, GlyphIterator> pairGfit = pgrseg->glyphs();
GlyphIterator gfit = pairGfit.first;
GlyphIterator gfitEnd = pairGfit.second;
for ( ; gfit != gfitEnd ; ++gfit)
{
if ((*gfit).erroneous())
{
fError = true;
break;
}
}
if (fError)
{
LgCharRenderProps chrp;
int ichwMinBogus, ichwLimBogus;
pgts->GetCharProps(ichwMin, &chrp, &ichwMinBogus, &ichwLimBogus);
StrUni stuMsg = L"Error in Graphite rendering using font ";