本文整理汇总了C++中GetIdentifier函数的典型用法代码示例。如果您正苦于以下问题:C++ GetIdentifier函数的具体用法?C++ GetIdentifier怎么用?C++ GetIdentifier使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetIdentifier函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ParseNameWithPotentialAPIMacroPrefix
void FBaseParser::ParseNameWithPotentialAPIMacroPrefix(FString& DeclaredName, FString& RequiredAPIMacroIfPresent, const TCHAR* FailureMessage)
{
// Expecting Name | (MODULE_API Name)
FToken NameToken;
// Read an identifier
if (!GetIdentifier(NameToken))
{
FError::Throwf(TEXT("Missing %s name"), FailureMessage);
}
// Is the identifier the name or an DLL import/export API macro?
FString NameTokenStr = NameToken.Identifier;
if (NameTokenStr.EndsWith(TEXT("_API"), ESearchCase::CaseSensitive))
{
RequiredAPIMacroIfPresent = NameTokenStr;
// Read the real name
if (!GetIdentifier(NameToken))
{
FError::Throwf(TEXT("Missing %s name"), FailureMessage);
}
DeclaredName = NameToken.Identifier;
}
else
{
DeclaredName = NameTokenStr;
RequiredAPIMacroIfPresent.Empty();
}
}
示例2: GetIdentifier
BOOL SERVER::SetMonitor (BOOL fShouldMonitor, ULONG *pStatus)
{
BOOL rc = TRUE;
ULONG status = 0;
if (m_fMonitor != fShouldMonitor)
{
LPCELL lpCell;
if ((lpCell = m_lpiCell->OpenCell (&status)) == NULL)
rc = FALSE;
else
{
NOTIFYCALLBACK::SendNotificationToAll (evtRefreshStatusBegin, GetIdentifier());
if ((m_fMonitor = fShouldMonitor) == FALSE)
{
FreeAll();
(lpCell->m_nServersUnmonitored)++;
}
else // (fMonitor == TRUE)
{
(lpCell->m_nServersUnmonitored)--;
Invalidate();
rc = RefreshAll (&status);
}
NOTIFYCALLBACK::SendNotificationToAll (evtRefreshStatusEnd, GetIdentifier(), m_lastStatus);
lpCell->Close();
}
}
if (!rc && pStatus)
*pStatus = status;
return rc;
}
示例3: VOID_TO_NPVARIANT
// Get the URL of the page where the plugin is hosted
CString CPlugin::GetHostURL() const
{
CString url;
BOOL bOK = FALSE;
NPVariant vLocation;
VOID_TO_NPVARIANT(vLocation);
NPVariant vHref;
VOID_TO_NPVARIANT(vHref);
try
{
NPObject* pWindow = GetWindow();
if ((!NPN_GetProperty( m_pNPInstance, pWindow, GetIdentifier("location"), &vLocation)) || !NPVARIANT_IS_OBJECT (vLocation))
{
throw(CString(_T("Cannot get window.location")));
}
if ((!NPN_GetProperty( m_pNPInstance, NPVARIANT_TO_OBJECT(vLocation), GetIdentifier("href"), &vHref)) || !NPVARIANT_IS_STRING(vHref))
{
throw(CString(_T("Cannot get window.location.href")));
}
// Convert encoding of window.location.href
int buffer_size = vHref.value.stringValue.UTF8Length + 1;
char* szUnescaped = new char[buffer_size];
DWORD dwSize = buffer_size;
if (SUCCEEDED(UrlUnescapeA(const_cast<LPSTR>(vHref.value.stringValue.UTF8Characters), szUnescaped, &dwSize, 0)))
{
WCHAR* szURL = new WCHAR[dwSize + 1];
if (MultiByteToWideChar(CP_UTF8, 0, szUnescaped, -1, szURL, dwSize + 1) > 0)
{
url = CW2T(szURL);
}
delete[] szURL;
}
delete[] szUnescaped;
}
catch (const CString& strMessage)
{
UNUSED(strMessage);
TRACE(_T("[CPlugin::GetHostURL Exception] %s\n"), strMessage);
}
if (!NPVARIANT_IS_VOID(vHref)) NPN_ReleaseVariantValue(&vHref);
if (!NPVARIANT_IS_VOID(vLocation)) NPN_ReleaseVariantValue(&vLocation);
return url;
}
示例4: SendACK
///////////////////////////////////////////////////////////////////////////////
/// CSRConnection::SendACK
/// @description Composes an ack and writes it to the channel. ACKS are saved
/// to the protocol's state and are written again during resends to try and
/// maximize througput.
/// @param The message to ACK.
/// @pre A message has been accepted.
/// @post The m_currentack member is set to the ack and the message will
/// be resent during resend until it expires.
///////////////////////////////////////////////////////////////////////////////
void CSRConnection::SendACK(const CMessage &msg)
{
Logger.Debug << __PRETTY_FUNCTION__ << std::endl;
unsigned int seq = msg.GetSequenceNumber();
freedm::broker::CMessage outmsg;
ptree pp;
pp.put("src.hash",msg.GetHash());
// Presumably, if we are here, the connection is registered
outmsg.SetSourceUUID(GetConnection()->GetConnectionManager().GetUUID());
outmsg.SetSourceHostname(GetConnection()->GetConnectionManager().GetHostname());
outmsg.SetStatus(freedm::broker::CMessage::Accepted);
outmsg.SetSequenceNumber(seq);
outmsg.SetSendTimestampNow();
outmsg.SetProtocol(GetIdentifier());
outmsg.SetProtocolProperties(pp);
Logger.Notice<<"Generating ACK. Source exp time "<<msg.GetExpireTime()<<std::endl;
outmsg.SetExpireTime(msg.GetExpireTime());
Write(outmsg);
m_currentack = outmsg;
/// Hook into resend until the message expires.
m_timeout.cancel();
m_timeout.expires_from_now(boost::posix_time::milliseconds(REFIRE_TIME));
m_timeout.async_wait(boost::bind(&CSRConnection::Resend,this,
boost::asio::placeholders::error));
}
示例5: GetIdentifier
uint32 CLogArchiver::GetNameValue(const char* &pStr, uint32 &nName, CString &oValue, uint32 &nValue)
{
bool bInt;
uint32 nRet;
CString oName;
nRet = GetIdentifier(pStr, oName);
if(!nRet)
nRet = GetNameType(oName, nName, bInt);
if(!nRet)
{
SkipWhiteSpace(pStr);
if(pStr[0] != '=')
nRet = 1;
else
++pStr;
}
if(!nRet)
{
if(bInt)
{
nRet = GetInt(pStr, oValue);
if(!nRet)
nValue = CString::Atoi(oValue.GetStr());
}
else
nRet = GetString(pStr, oValue);
}
return nRet;
}
示例6: wxLogInfo
void pgForeignServer::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (!expandedKids)
{
expandedKids = true;
browser->RemoveDummyChild(this);
// Log
wxLogInfo(wxT("Adding child object to foreign server %s"), GetIdentifier().c_str());
if (settings->GetDisplayOption(_("User Mappings")))
browser->AppendCollection(this, userMappingFactory);
}
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("OID"), GetOid());
properties->AppendItem(_("Owner"), GetOwner());
properties->AppendItem(_("ACL"), GetAcl());
properties->AppendItem(_("Type"), GetType());
properties->AppendItem(_("Version"), GetVersion());
properties->AppendItem(_("Options"), GetOptions());
}
}
示例7: GetNumAttributes
bool NAMESPACE_TUPLE::Triple::Equals(const ITuple& rhs) const
{
return rhs.GetNumAttributes() == GetNumAttributes() &&
rhs.GetIdentifier() == GetIdentifier() &&
rhs.GetAttribute(0) == GetAttribute(0) &&
rhs.GetValue(0) == GetValue(0);
}
示例8: GetNextToken
int GetNextToken()
{
EatWhitespace();
if (isalpha(LastChar)) {
return GetIdentifier();
}
if (isdigit(LastChar) || LastChar == '.') {
return GetNumber();
}
if (LastChar == '#') {
SkipComment();
if (LastChar != EOF) {
return GetNextToken();
}
}
if (LastChar == EOF) {
return static_cast<int>(Token::Eof);
}
int ch = LastChar;
LastChar = getchar();
return ch;
}
示例9: GetWindow
NPObject* CPlugin::GetWindowPropertyObject(const NPUTF8* szPropertyName) const
{
NPObject* pWindow = GetWindow();
NPVariant vObject;
VOID_TO_NPVARIANT(vObject);
if ((!NPN_GetProperty(m_pNPInstance, pWindow, GetIdentifier(szPropertyName), &vObject)) || !NPVARIANT_IS_OBJECT(vObject))
{
if (!NPVARIANT_IS_VOID(vObject))
NPN_ReleaseVariantValue(&vObject);
throw CString(_T("Cannot get window.")) + NPStringCharactersToCString(szPropertyName);
}
NPObject* pObject = NPVARIANT_TO_OBJECT(vObject);
if (!pObject)
{
NPN_ReleaseVariantValue(&vObject);
throw CString(_T("window.")) + NPStringCharactersToCString(szPropertyName) + _T(" is null");
}
NPN_RetainObject(pObject);
NPN_ReleaseVariantValue(&vObject);
return pObject;
}
示例10: GetConnection
void CSUConnection::Send(CMessage msg)
{
unsigned int msgseq;
msgseq = m_outseq;
msg.SetSequenceNumber(msgseq);
m_outseq = (m_outseq+1) % SEQUENCE_MODULO;
msg.SetSourceUUID(GetConnection()->GetConnectionManager().GetUUID());
msg.SetSourceHostname(
GetConnection()->GetConnectionManager().GetHostname());
msg.SetProtocol(GetIdentifier());
msg.SetSendTimestampNow();
QueueItem q;
q.ret = MAX_RETRIES;
q.msg = msg;
m_window.push_back(q);
if(m_window.size() < WINDOW_SIZE)
{
Write(msg);
m_timeout.cancel();
m_timeout.expires_from_now(boost::posix_time::milliseconds(50));
m_timeout.async_wait(boost::bind(&CSUConnection::Resend,this,
boost::asio::placeholders::error));
}
}
示例11: SendSYN
///////////////////////////////////////////////////////////////////////////////
/// CSRConnection::CSRConnection
/// @description Send function for the CSRConnection. Sending using this
/// protocol involves an alternating bit scheme. Messages can expire and
/// delivery won't be attempted after the deadline is passed. Killed messages
/// are noted in the next outgoing message. The reciever tracks the killed
/// messages and uses them to help maintain ordering.
/// @pre The protocol is intialized.
/// @post At least one message is in the channel and actively being resent.
/// The send window is greater than or equal to one. The timer for the
/// resend is freshly set or is currently running for a resend.
/// If a message is written to the channel, the m_killable flag is set.
/// @param msg The message to write to the channel.
///////////////////////////////////////////////////////////////////////////////
void CSRConnection::Send(CMessage msg)
{
Logger.Debug << __PRETTY_FUNCTION__ << std::endl;
ptree x = static_cast<ptree>(msg);
unsigned int msgseq;
if(m_outsync == false)
{
SendSYN();
}
CMessage outmsg(x);
msgseq = m_outseq;
outmsg.SetSequenceNumber(msgseq);
m_outseq = (m_outseq+1) % SEQUENCE_MODULO;
outmsg.SetSourceUUID(GetConnection()->GetConnectionManager().GetUUID());
outmsg.SetSourceHostname(GetConnection()->GetConnectionManager().GetHostname());
outmsg.SetProtocol(GetIdentifier());
outmsg.SetSendTimestampNow();
if(!outmsg.HasExpireTime())
{
Logger.Notice<<"Set Expire time"<<std::endl;
outmsg.SetExpireTimeFromNow(boost::posix_time::milliseconds(3000));
}
m_window.push_back(outmsg);
if(m_window.size() == 1)
{
Write(outmsg);
boost::system::error_code x;
Resend(x);
}
}
示例12: wxLogInfo
void edbPackage::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (!expandedKids)
{
expandedKids=true;
browser->RemoveDummyChild(this);
// Log
wxLogInfo(wxT("Adding child object to package %s"), GetIdentifier().c_str());
browser->AppendCollection(this, packageFunctionFactory);
browser->AppendCollection(this, packageProcedureFactory);
browser->AppendCollection(this, packageVariableFactory);
}
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("OID"), GetOid());
properties->AppendItem(_("Owner"), GetOwner());
properties->AppendItem(_("Header"), firstLineOnly(GetHeader()));
properties->AppendItem(_("Body"), firstLineOnly(GetBody()));
properties->AppendItem(_("ACL"), GetAcl());
properties->AppendItem(_("System package?"), GetSystemObject());
if (GetConnection()->EdbMinimumVersion(8, 2))
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
}
}
示例13: GetToken
void GetToken(void)
{
//int n =0;
// Simply reads in the next statement and places it in the
// token buffer.
ParseWhitespace();
switch (chr_table[*src])
{
case LETTER:
//token_type = IDENTIFIER;
tok.type=IDENTIFIER;
GetIdentifier();
break;
case DIGIT:
//token_type = DIGIT;
tok.type=DIGIT;
GetNumber();
break;
case SPECIAL:
//token_type = CONTROL;
tok.type=CONTROL;
GetPunctuation();
break;
}
//printf("token: %s\n", tok.ident);
if (!*src && inevent)
{
err("Unexpected end of file");
}
}
示例14: TF_CODING_ERROR
GfMatrix4d
UsdGeomConstraintTarget::ComputeInWorldSpace(
UsdTimeCode time,
UsdGeomXformCache *xfCache) const
{
if (not IsDefined()) {
TF_CODING_ERROR("Invalid constraint target.");
return GfMatrix4d(1);
}
const UsdPrim &modelPrim = GetAttr().GetPrim();
GfMatrix4d localToWorld(1);
if (xfCache) {
xfCache->SetTime(time);
localToWorld = xfCache->GetLocalToWorldTransform(modelPrim);
} else {
UsdGeomXformCache cache;
cache.SetTime(time);
localToWorld = cache.GetLocalToWorldTransform(modelPrim);
}
GfMatrix4d localConstraintSpace(1.);
if (not Get(&localConstraintSpace, time)) {
TF_WARN("Failed to get value of constraint target '%s' at path <%s>.",
GetIdentifier().GetText(), GetAttr().GetPath().GetText());
return localConstraintSpace;
}
return localConstraintSpace * localToWorld;
}
示例15: GetIdentifier
void SERVICE::Invalidate (void)
{
if (!m_fStatusOutOfDate)
{
m_fStatusOutOfDate = TRUE;
NOTIFYCALLBACK::SendNotificationToAll (evtInvalidate, GetIdentifier());
}
}