本文整理汇总了C++中Tag函数的典型用法代码示例。如果您正苦于以下问题:C++ Tag函数的具体用法?C++ Tag怎么用?C++ Tag使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Tag函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetBP
void SetBP(DEBUG_EVENT *dbe)
{
BREAKPOINT **p = &activeProcess->breakpoints.next;
if (hwndASM && GetFocus() == hwndASM)
{
int addr = SendMessage(hwndASM, WM_GETCURSORADDRESS, 0, 0);
Tag(TAG_BP, 0, addr, 0, 0, 0, 0);
if (uState == Running)
allocBreakPoint(activeProcess->hProcess, *p);
}
else
{
HWND hWnd = GetFocus();
DWINFO *ptr = editWindows;
while (ptr)
{
if (ptr->active && ptr->dwHandle == hWnd)
{
int addr, linenum;
SendMessage(ptr->dwHandle, EM_GETSEL, (WPARAM) &linenum, 0);
linenum = SendMessage(ptr->dwHandle, EM_EXLINEFROMCHAR, 0,
linenum) + 1;
Tag(TAG_BP, ptr->dwName, linenum, 0, 0, 0, 0);
break;
}
ptr = ptr->next;
}
}
if (hwndASM)
InvalidateRect(hwndASM, 0, 0);
}
示例2: Tag
Tag Object::toTag() const
{
if(isTag())
return Tag(*this);
else
return Tag();
}
示例3: ObjTag
void CRTDBItem::OnPoke()
{
Strng Tag, Cnv;
TaggedObject::SplitTagCnv((char*)(const char*)m_strName, Tag, Cnv);
CXM_ObjectTag ObjTag(Tag(), TABOpt_AllInfoOnce);
CXM_ObjectData ObjData;
CXM_Route Route;
DWORD RetCode = pDdeExec->XReadTaggedItem(ObjTag, ObjData, Route);
//LogNote(Tag(), 0, "DDE Poke: '%s' %s", pszItem, RetCode ? "Found" : "Not Found");
if (RetCode==0)
LogError(Tag(), 0, "DDE: Tag poke for '%s' not found", (const char*)m_strName);
pDdeExec->StatsCnt[RetCode==0 ? 3 : 2]++;
if (RetCode)
{
CPkDataItem * pPItem = ObjData.FirstItem();
CCnvIndex iCnv = 0;
if (pPItem->Contains(PDI_CnvInfo))
iCnv = pPItem->CnvIndex();
PkDataUnion DU;
DU.SetTypeString(pPItem->Type(), (char*)(const char*)m_strData, iCnv, Cnv());
CXM_ObjectData ObjData(0, 0, Tag(), 0, DU);
flag Ok = (pDdeExec->XWriteTaggedItem(ObjData, Route)==TOData_OK);
if (Ok)
gs_Exec.m_Seq.NoteManSet(CExecSequence::VSS_DDE, Tag(), m_strData, Cnv());
}
}
示例4: get
DynamicQuantity get(const input::Traits<Localization>& traits) const {
if (traits.field(Tag()).range().second) {
return dynamizer(*traits.field(Tag()).range().second);
} else {
throw std::runtime_error("Tried to read variable " + name + ", but it is not defined.");
}
}
示例5: set
bool set( const input::Traits<Localization>& localization_traits, Localization& localization, const DynamicQuantity& value ) const {
const typename Tag::ValueType parsed_value( dynamizer(value) );
localization.field(Tag()) = parsed_value;
const auto& traits = localization_traits.field(Tag());
return (!traits.range().first || *traits.range().first <= parsed_value) &&
(!traits.range().second || *traits.range().second >= parsed_value);
}
示例6:
Tags::Tags(string str) {
bool read_tag_mode = false;
size_t str_size = str.size();
string tag = "";
for (size_t c = 0; c < str_size; c++) {
if (str[c] == '@') {
if (read_tag_mode) {
tags.push_back(Tag(tag));
}
else {
name = tag;
read_tag_mode = true;
}
tag = "";
}
else {
tag += str[c];
}
}
if (tag.size()) {
if (read_tag_mode) {
tags.push_back(Tag(tag));
}
else {
name = tag;
}
}
}
示例7: Tag
void CActuator::FixIOTags()
{
int N=m_DataBlk.GetSize()*1+1;
m_IOAreas.SetSize(N);
int j=0;
for (int i=0; i<m_DataBlk.GetSize(); i++)
{
CActuatorBlk * pT = m_DataBlk[i];
if (!pT->m_sID())
pT->m_sID.Set("A%i",i);
pT->m_sIDInput.Set("%s.%s.Rqd", Tag(), pT->m_sID());
pT->m_sIDOutput.Set("%s.%s.Out", Tag(), pT->m_sID());
pT->m_sTagInput.Set("%s.Cfg.[%i].%s", Tag(), i, "Rqd");
pT->m_sTagOutput.Set("%s.Cfg.[%i].%s", Tag(), i, "Out");
IOAreaRec & AV= m_IOAreas[j];
AV=BaseActuatorIOArea;
AV.SetIODesc(pT->m_sIDInput());
AV.SetIOName(IONames[j]());
AV.m_Id=CtrlIOId(j);
j++;
//IOAreaRec & AR= m_IOAreas[j];
//AR=BaseActuatorIOArea;
//AR.pDesc=pT->m_sIORaw();
//AR.pName=IONames[j]();
//AR.Id=j;
//j++;
}
m_IOAreas[j]=BaseActuatorIOArea;
AttachIOAreas(&m_IOAreas[0], NULL, NULL, false);
StructureChanged(this);
}
示例8: url
AuthorizationResultPtr OAuth2Response::parseAuthorizeResponse(const String& webAuthenticationResult, CallStatePtr/* callState*/)
{
Logger::info(Tag(), "parseAuthorizeResponse");
Logger::hidden(Tag(), "webAuthenticationResult: " + webAuthenticationResult);
AuthorizationResultPtr parseResult = nullptr;
QUrl url(webAuthenticationResult.data());
if (url.hasQuery())
{
QUrlQuery query = QUrlQuery(url);
if( query.hasQueryItem(OAuthConstants::oAuthReservedClaim().Code.data()) )
{
parseResult = std::make_shared<AuthorizationResult>(query.queryItemValue(OAuthConstants::oAuthReservedClaim().Code.data()).toStdString());
}
else if( query.hasQueryItem(OAuthConstants::oAuthReservedClaim().Error.data()) )
{
String error = query.queryItemValue(OAuthConstants::oAuthReservedClaim().Error.data()).toStdString();
String errorDesc = query.hasQueryItem(OAuthConstants::oAuthReservedClaim().ErrorDescription.data())
? query.queryItemValue(OAuthConstants::oAuthReservedClaim().ErrorDescription.data(), QUrl::FullyDecoded).toStdString()
: "";
parseResult = std::make_shared<AuthorizationResult>(
error,
StringUtils::replaceAll(errorDesc, '+', ' '));
}
else
{
parseResult = std::make_shared<AuthorizationResult>(
Constants::rmsauthError().AuthenticationFailed,
Constants::rmsauthErrorMessage().AuthorizationServerInvalidResponse);
}
}
return parseResult;
}
示例9: Tag
Tag Sequence::getTag(unsigned int index) const
{
if (index < value_.size())
{
return Tag(value_.at(index));
}
return Tag();
}
示例10: cyl_bessel_j_prime_imp
inline T cyl_bessel_j_prime_imp(T v, T x, const Policy& pol)
{
static const char* const function = "boost::math::cyl_bessel_j_prime<%1%>(%1%,%1%)";
BOOST_MATH_STD_USING
//
// Prevent complex result:
//
if (x < 0 && floor(v) != v)
return boost::math::policies::raise_domain_error<T>(
function,
"Got x = %1%, but function requires x >= 0", x, pol);
//
// Special cases for x == 0:
//
if (x == 0)
{
if (v == 1)
return 0.5;
else if (v == -1)
return -0.5;
else if (floor(v) == v || v > 1)
return 0;
else return boost::math::policies::raise_domain_error<T>(
function,
"Got x = %1%, but function is indeterminate for this order", x, pol);
}
//
// Special case for large x: use asymptotic expansion:
//
if (boost::math::detail::asymptotic_bessel_derivative_large_x_limit(v, x))
return boost::math::detail::asymptotic_bessel_j_derivative_large_x_2(v, x);
//
// Special case for small x: use Taylor series:
//
if ((abs(x) < 5) || (abs(v) > x * x / 4))
{
bool inversed = false;
if (floor(v) == v && v < 0)
{
v = -v;
if (itrunc(v, pol) & 1)
inversed = true;
}
T r = boost::math::detail::bessel_j_derivative_small_z_series(v, x, pol);
return inversed ? T(-r) : r;
}
//
// Special case for v == 0:
//
if (v == 0)
return -boost::math::detail::cyl_bessel_j_imp<T>(1, x, Tag(), pol);
//
// Default case:
//
return boost::math::detail::bessel_j_derivative_linear(v, x, Tag(), pol);
}
示例11: setId
void Pet::fromJson(nlohmann::json& val)
{
if(val.find("id") != val.end())
{
setId(val.at("id"));
}
if(val.find("category") != val.end())
{
if(!val["category"].is_null())
{
Category newItem(Category());
newItem.fromJson(val["category"]);
setCategory( newItem );
}
}
setName(val.at("name"));
{
m_PhotoUrls.clear();
nlohmann::json jsonArray;
for( auto& item : val["photoUrls"] )
{
m_PhotoUrls.push_back(item);
}
}
{
m_Tags.clear();
nlohmann::json jsonArray;
if(val.find("tags") != val.end())
{
for( auto& item : val["tags"] )
{
if(item.is_null())
{
m_Tags.push_back( Tag(nullptr) );
}
else
{
Tag newItem(Tag());
newItem.fromJson(item);
m_Tags.push_back( newItem );
}
}
}
}
if(val.find("status") != val.end())
{
setStatus(val.at("status"));
}
}
示例12: Tag
void TypeMap::registerMapping(const char *tag, const char *ns, const char *classname, NodeHandler *handler) {
tags[Tag(tag, ns)] = classname;
std::pair<RawTagMap::iterator,bool> itp;
itp = tagsWithoutNs.insert(RawTagMap::value_type(tag, classname));
// Tag exists already -> set invalid classname
if ( !itp.second ) itp.first->second.clear();
classes[classname] = Tag(tag, ns);
handlers[classname] = new TypeNameHandler(handler, classname);
}
示例13: Tag
bool ArrayType::Equal(const Type* other) const
{
if( getArchType() != other->getArchType())
return false;
return Tag() == other->Tag();
}
示例14: clear
void PnlPlnrUsgDetail::DpchEngData::readXML(
xmlXPathContext* docctx
, string basexpath
, bool addbasetag
) {
clear();
bool basefound;
if (addbasetag)
basefound = checkUclcXPaths(docctx, basexpath, basexpath, "DpchEngPlnrUsgDetailData");
else
basefound = checkXPath(docctx, basexpath);
if (basefound) {
if (extractStringUclc(docctx, basexpath, "scrJref", "", scrJref)) add(SCRJREF);
if (contiac.readXML(docctx, basexpath, true)) add(CONTIAC);
if (continf.readXML(docctx, basexpath, true)) add(CONTINF);
if (statapp.readXML(docctx, basexpath, true)) add(STATAPP);
if (statshr.readXML(docctx, basexpath, true)) add(STATSHR);
if (tag.readXML(docctx, basexpath, true)) add(TAG);
} else {
contiac = ContIac();
continf = ContInf();
statapp = StatApp();
statshr = StatShr();
tag = Tag();
};
};
示例15: while
/* readonly attribute nsIDOMSVGSVGElement ownerSVGElement; */
NS_IMETHODIMP
nsSVGElement::GetOwnerSVGElement(nsIDOMSVGSVGElement * *aOwnerSVGElement)
{
*aOwnerSVGElement = nsnull;
nsIContent* ancestor = nsSVGUtils::GetParentElement(this);
while (ancestor && ancestor->GetNameSpaceID() == kNameSpaceID_SVG) {
nsIAtom* tag = ancestor->Tag();
if (tag == nsGkAtoms::foreignObject) {
// SVG in a foreignObject must have its own <svg> (nsSVGOuterSVGFrame).
// Leave *aOwnerSVGElement nulled out, but don't throw.
return NS_OK;
}
if (tag == nsGkAtoms::svg) {
*aOwnerSVGElement = static_cast<nsSVGSVGElement*>(ancestor);
NS_ADDREF(*aOwnerSVGElement);
return NS_OK;
}
ancestor = nsSVGUtils::GetParentElement(ancestor);
}
// we don't have a parent SVG element...
// are _we_ the outermost SVG element? If yes, return nsnull, but don't fail
if (Tag() == nsGkAtoms::svg) {
return NS_OK;
}
// no owner found and we aren't the outermost SVG element either.
// this situation can e.g. occur during content tree teardown.
return NS_ERROR_FAILURE;
}