本文整理汇总了C++中GetComment函数的典型用法代码示例。如果您正苦于以下问题:C++ GetComment函数的具体用法?C++ GetComment怎么用?C++ GetComment使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetComment函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wxT
wxString pgOperator::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- Operator: ") + GetQuotedFullIdentifier() + wxT("(") + GetOperands() + wxT(")\n\n")
+ wxT("-- DROP OPERATOR ") + GetQuotedFullIdentifier()
+ wxT("(") + GetOperands() + wxT(");\n\n")
wxT("CREATE OPERATOR ") + GetQuotedFullIdentifier()
+ wxT("(\n PROCEDURE = ") + GetOperatorFunction();
AppendIfFilled(sql, wxT(",\n LEFTARG = "), qtTypeIdent(GetLeftType()));
AppendIfFilled(sql, wxT(",\n RIGHTARG = "), qtTypeIdent(GetRightType()));
AppendIfFilled(sql, wxT(",\n COMMUTATOR = "), GetCommutator());
AppendIfFilled(sql, wxT(",\n RESTRICT = "), GetRestrictFunction());
AppendIfFilled(sql, wxT(",\n JOIN = "), GetJoinFunction());
if (GetHashJoins()) sql += wxT(",\n HASHES");
if (GetMergeJoins()) sql += wxT(",\n MERGES");
if (!GetDatabase()->BackendMinimumVersion(8, 3))
{
AppendIfFilled(sql, wxT(",\n SORT1 = "), GetLeftSortOperator());
AppendIfFilled(sql, wxT(",\n SORT2 = "), GetRightSortOperator());
AppendIfFilled(sql, wxT(",\n LTCMP = "), GetLessOperator());
AppendIfFilled(sql, wxT(",\n GTCMP = "), GetGreaterOperator());
}
sql += wxT(");\n");
if (!GetComment().IsNull())
sql += wxT("COMMENT ON OPERATOR ") + GetQuotedFullIdentifier()
+ wxT("(") + GetOperands() + wxT(") IS ")
+ qtDbString(GetComment()) + wxT(";\n");
}
return sql;
}
示例2: loadXMLFile
bool loadXMLFile (TiXmlDocument &pXMLDoc, std::string XMLFilename, std::map<int,
std::string> * pMapXmlStrings, bool isSourceFile)
{
if (!pXMLDoc.LoadFile(XMLFilename.c_str()))
{
printf ("%s %s\n", pXMLDoc.ErrorDesc(), XMLFilename.c_str());
return false;
}
if (isSourceFile) GetEncoding(&pXMLDoc, sourceXMLEncoding);
else GetEncoding(&pXMLDoc, foreignXMLEncoding);
TiXmlElement* pRootElement = pXMLDoc.RootElement();
if (!pRootElement || pRootElement->NoChildren() || pRootElement->ValueTStr()!="strings")
{
printf ("error: No root element called: \"strings\" or no child found in input XML file: %s\n",
XMLFilename.c_str());
return false;
}
if (isSourceFile) GetComment(pRootElement->FirstChild(), -1);
const TiXmlElement *pChildElement = pRootElement->FirstChildElement("string");
const char* pAttrId = NULL;
const char* pValue = NULL;
std::string valueString;
int id;
while (pChildElement)
{
pAttrId=pChildElement->Attribute("id");
if (pAttrId && !pChildElement->NoChildren())
{
id = atoi(pAttrId);
if (pMapXmlStrings->find(id) == pMapXmlStrings->end())
{
pValue = pChildElement->FirstChild()->Value();
valueString = EscapeLF(pValue);
if (isSourceFile)
multimapSourceXmlStrings.insert(std::pair<std::string,int>( valueString,id));
(*pMapXmlStrings)[id] = valueString;
if (pChildElement && isSourceFile) GetComment(pChildElement->NextSibling(), id);
}
}
pChildElement = pChildElement->NextSiblingElement("string");
}
// Free up the allocated memory for the XML file
pXMLDoc.Clear();
return true;
}
示例3: qWarning
QStandardItem* QuarkManager::MakeItem (const QString& id) const
{
auto item = Finder_->FindItem (id);
if (!item)
{
qWarning () << Q_FUNC_INFO
<< "item not found"
<< id;
return 0;
}
ImageProv_->AddItem (item);
auto modelItem = new QStandardItem;
modelItem->setData (item->GetPermanentID (), LaunchModel::Roles::PermanentID);
const auto& curLang = Util::GetLanguage ().toLower ();
auto descr = item->GetComment (curLang);
if (descr.isEmpty ())
descr = item->GetGenericName (curLang);
auto name = item->GetName (curLang);
if (!descr.isEmpty ())
name += " (" + descr + ")";
modelItem->setData (name, LaunchModel::Roles::AppName);
return modelItem;
}
示例4: ForwardLabel
void ForwardLabel (unsigned Offs)
/* If necessary, output a forward label, one that is within the next few
* bytes and is therefore output as "label = * + x".
*/
{
/* Calculate the actual address */
unsigned long Addr = PC + Offs;
/* Get the type of the label */
attr_t A = GetLabelAttr (Addr);
/* If there is no label, or just a dependent one, bail out */
if (A == atNoLabel || (A & atDepLabel) != 0) {
return;
}
/* An unnamed label cannot be output as a forward declaration, so this is
* an error.
*/
if (A == atUnnamedLabel) {
Error ("Cannot define unnamed label at address $%04lX", Addr);
}
/* Output the label */
DefForward (GetLabelName (Addr), GetComment (Addr), Offs);
}
示例5: UpdateValues
void pgSequence::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
UpdateValues();
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("OID"), GetOid());
properties->AppendItem(_("Owner"), GetOwner());
properties->AppendItem(_("ACL"), GetAcl());
properties->AppendItem(_("Current value"), GetLastValue());
properties->AppendItem(_("Next value"), GetNextValue());
properties->AppendItem(_("Minimum"), GetMinValue());
properties->AppendItem(_("Maximum"), GetMaxValue());
properties->AppendItem(_("Increment"), GetIncrement());
properties->AppendItem(_("Cache"), GetCacheValue());
properties->AppendYesNoItem(_("Cycled?"), GetCycled());
properties->AppendYesNoItem(_("Called?"), GetCalled());
properties->AppendYesNoItem(_("System sequence?"), GetSystemObject());
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
if (!GetLabels().IsEmpty())
{
wxArrayString seclabels = GetProviderLabelArray();
if (seclabels.GetCount() > 0)
{
for (unsigned int index = 0 ; index < seclabels.GetCount() - 1 ; index += 2)
{
properties->AppendItem(seclabels.Item(index), seclabels.Item(index + 1));
}
}
}
}
}
示例6: CreateListColumns
void pgLanguage::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("OID"), GetOid());
if (GetConnection()->BackendMinimumVersion(8, 3))
properties->AppendItem(_("Owner"), GetOwner());
properties->AppendItem(_("ACL"), GetAcl());
properties->AppendYesNoItem(_("Trusted?"), GetTrusted());
properties->AppendItem(_("Handler function"), GetHandlerProc());
if (GetConnection()->BackendMinimumVersion(9, 0))
properties->AppendItem(_("Inline function"), GetInlineProc());
properties->AppendItem(_("Validator function"), GetValidatorProc());
properties->AppendYesNoItem(_("System language?"), GetSystemObject());
if (GetConnection()->BackendMinimumVersion(7, 5))
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
if (!GetLabels().IsEmpty())
{
wxArrayString seclabels = GetProviderLabelArray();
if (seclabels.GetCount() > 0)
{
for (unsigned int index = 0 ; index < seclabels.GetCount() - 1 ; index += 2)
{
properties->AppendItem(seclabels.Item(index), seclabels.Item(index + 1));
}
}
}
}
}
示例7: CreateListColumns
void pgOperator::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("OID"), GetOid());
properties->AppendItem(_("Owner"), GetOwner());
properties->AppendItem(_("Kind"), GetKind());
if (!leftType.IsNull())
properties->AppendItem(_("Left type"), GetLeftType());
if (!rightType.IsNull())
properties->AppendItem(_("Right type"), GetRightType());
properties->AppendItem(_("Result type"), GetResultType());
properties->AppendItem(_("Operator function"), GetOperatorFunction());
properties->AppendItem(_("Commutator"), GetCommutator());
properties->AppendItem(_("Negator"), GetNegator());
properties->AppendItem(_("Join function"), GetJoinFunction());
properties->AppendItem(_("Restrict function"), GetRestrictFunction());
if (!GetDatabase()->BackendMinimumVersion(8, 3))
{
properties->AppendItem(_("Left Sort operator"), GetLeftSortOperator());
properties->AppendItem(_("Right Sort operator"), GetRightSortOperator());
properties->AppendItem(_("Less Than operator"), GetLessOperator());
properties->AppendItem(_("Greater than operator"), GetGreaterOperator());
}
properties->AppendYesNoItem(_("Supports hash?"), GetHashJoins());
properties->AppendYesNoItem(_("Supports merge?"), GetMergeJoins());
properties->AppendYesNoItem(_("System operator?"), GetSystemObject());
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
}
}
示例8: GetComment
void xlw::XlfFuncDesc::DoMamlDocs(std::ostream& ostr) const
{
ostr << "<introduction>" << std::endl;
XlfArgDescList& arguments = impl_->arguments_;
ostr << "<para>" << GetComment() << "</para>" << std::endl;
std::string argnames;
XlfArgDescList::const_iterator it = arguments.begin();
while (it != arguments.end())
{
argnames += (*it).GetName();
++it;
if (it != arguments.end())
argnames+=", ";
}
ostr << "<code>=" << GetAlias() << "(" << argnames << ")</code>" << std::endl;
ostr << "</introduction>" << std::endl;
ostr << "<section>" << std::endl;
ostr << " <title>Parameters</title>" << std::endl;
ostr << " <content>" << std::endl;
for (it = arguments.begin(); it != arguments.end(); ++it)
{
ostr << " <para>";
ostr << (*it).GetName() << ": " << (*it).GetComment();
ostr << "</para>" << std::endl;
}
ostr << " </content>" << std::endl;
ostr << "</section>" << std::endl;
}
示例9: XlfOper
int XlfCmdDesc::AddToMenuBar(const std::string& menu, const std::string& text)
{
XLOPER xMenu;
LPXLOPER pxMenu;
LPXLOPER px;
menu_ = menu;
text_ = text;
// This is a small trick to allocate an array 5 XlfOper
// One must first allocate the array with XLOPER
// px = pxMenu = (LPXLOPER)new XLOPER[5];
px = pxMenu = new XLOPER[5];
// and then assign the XLOPER to XlfOper specifying false
// to tell the Framework that the data is not owned by
// Excel and that it should not call xlFree when destroyed
XlfOper(px++).Set(text_.c_str());
XlfOper(px++).Set(GetAlias().c_str());
XlfOper(px++).Set("");
XlfOper(px++).Set(GetComment().c_str());
XlfOper(px++).Set("");
xMenu.xltype = xltypeMulti;
xMenu.val.array.lparray = pxMenu;
xMenu.val.array.rows = 1;
xMenu.val.array.columns = 5;
int err = XlfExcel::Instance().Call(xlfAddCommand, 0, 3, (LPXLOPER)XlfOper(1.0), (LPXLOPER)XlfOper(menu_.c_str()), (LPXLOPER)&xMenu);
if (err != xlretSuccess)
std::cerr << XLW__HERE__ << "Add command " << GetName().c_str() << " to " << menu_.c_str() << " failed" << std::endl;
delete[] pxMenu;
return err;
}
示例10: AfxMessageBox
BOOL CWedDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
BOOL retval = FALSE;
if(GetNumOfDocs() > MAX_DOC_LIMIT)
{
AfxMessageBox("Too many open documents");
return FALSE;
}
// For originial document properties
_stat(lpszPathName, &docstat); docstat2 = docstat;
// Load as usual
retval = CDocument::OnOpenDocument(lpszPathName);
//P2N("Opened document %s\r\n", lpszPathName);
// Get the undo/redo
LoadUndo(lpszPathName); LoadRedo(lpszPathName);
// Used by IsDocModified()
undoorig = undo.GetCount();
//P2N("Undo orig = %d\r\n", undoorig);
SaveBackup(lpszPathName);
// Assign comment file
GetComment(lpszPathName);
return(retval);
}
示例11: CreateListColumns
void pgaStep::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (!expandedKids)
{
expandedKids = true;
}
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("ID"), GetRecId());
properties->AppendYesNoItem(_("Enabled"), GetEnabled());
properties->AppendItem(_("Kind"), GetKind());
if (GetConnStr().IsEmpty())
properties->AppendItem(_("Database"), GetDbname());
else
properties->AppendItem(_("Connection String"), GetConnStr());
properties->AppendItem(_("Code"), GetCode());
properties->AppendItem(_("On error"), GetOnError());
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
}
}
示例12: CreateListColumns
void pgaSchedule::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (!expandedKids)
{
expandedKids = true;
}
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("ID"), GetRecId());
properties->AppendYesNoItem(_("Enabled"), GetEnabled());
properties->AppendItem(_("Start date"), GetStart());
properties->AppendItem(_("End date"), GetEnd());
properties->AppendItem(_("Minutes"), GetMinutesString());
properties->AppendItem(_("Hours"), GetHoursString());
properties->AppendItem(_("Weekdays"), GetWeekdaysString());
properties->AppendItem(_("Monthdays"), GetMonthdaysString());
properties->AppendItem(_("Months"), GetMonthsString());
properties->AppendItem(_("Exceptions"), GetExceptionsString());
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
}
}
示例13: CreateListColumns
void pgRule::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (properties)
{
CreateListColumns(properties);
wxString def = GetFormattedDefinition();
if (!def.IsEmpty())
{
int doPos = def.Find(wxT(" DO INSTEAD "));
if (doPos > 0)
def = def.Mid(doPos + 12).Strip(wxString::both);
else
{
doPos = def.Find(wxT(" DO "));
if (doPos > 0)
def = def.Mid(doPos + 4).Strip(wxString::both);
}
}
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("OID"), GetOid());
properties->AppendItem(_("Event"), GetEvent());
properties->AppendItem(_("Condition"), GetCondition());
properties->AppendYesNoItem(_("Do instead?"), GetDoInstead());
properties->AppendItem(_("Definition"), firstLineOnly(def));
if (this->GetDatabase()->connection()->BackendMinimumVersion(8, 3))
properties->AppendYesNoItem(_("Enabled?"), GetEnabled());
properties->AppendYesNoItem(_("System rule?"), GetSystemObject());
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
}
}
示例14: 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()));
}
}
示例15: wxT
wxString pgForeignKey::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- Foreign Key: ") + GetQuotedFullIdentifier() + wxT("\n\n")
+ wxT("-- ALTER TABLE ") + GetQuotedSchemaPrefix(fkSchema) + qtIdent(fkTable)
+ wxT(" DROP CONSTRAINT ") + GetQuotedIdentifier() + wxT(";")
+ wxT("\n\nALTER TABLE ") + GetQuotedSchemaPrefix(fkSchema) + qtIdent(fkTable)
+ wxT("\n ADD CONSTRAINT ") + GetConstraint()
+ wxT(";\n");
if (!GetComment().IsEmpty())
sql += wxT("COMMENT ON CONSTRAINT ") + GetQuotedIdentifier() + wxT(" ON ") + GetQuotedSchemaPrefix(fkSchema) + qtIdent(fkTable)
+ wxT(" IS ") + qtDbString(GetComment()) + wxT(";\n");
}
return sql;
}