本文整理汇总了C++中LogMessage::send方法的典型用法代码示例。如果您正苦于以下问题:C++ LogMessage::send方法的具体用法?C++ LogMessage::send怎么用?C++ LogMessage::send使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LogMessage
的用法示例。
在下文中一共展示了LogMessage::send方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: actionParser
bool RunPackage::actionParser(char* s) const
{
// send plain text to the log
if ( strcmp(s, "Text") == 0){
char* tok = strtok(NULL, "}");
LogMessage msg;
msg << tok;
msg.send();
return true;
}
// create a file link
if (strcmp(s, "Link") == 0){
char* text = strtok(NULL, ",");
char* filename = strtok(NULL, "}");
LogMessage msg1;
msg1 << Link(Chars( text ),
"Package",Chars(filename), true );
msg1.send();
ofstream colorf(Chars(filename)+Chars(".color"),ios::app);
colorf << "#0000000%[email protected]" << flush;
colorf.close();
return true;
}
// Create an object in the workspace
if (strncmp("Create", s, strlen("Create")) == 0 ){
// get object description and parent
char* description = strtok(NULL, "|");
Chars errMsg;
// create a group
if (strcmp(s, "CreateGroup")==0){
FPGroup G;
//@njz
// strstream ss;
std::strstream ss;
//
ss << description << endl;
ss >> G;
SMFPGroup* smo =
new SMFPGroup( G,Text("The group created from a package") );
ListOf<OID> dependencies;
CheckinMessage( *smo, "", dependencies ).send();
return true;
} else { // if not a group than ...
示例2: takeControl
void EditPackage::takeControl( )
{
Packages ps;
ListOf<ParamRecord> params;
PackageRecord r = ps.getPackage(theObject, theIndex,params);
ListIterator<ListOf<ParamRecord> > I(params);
for (I.reset();!I.done();I.next()) {
LogMessage msg;
msg << "Parameters : " << I.value().getName() << ", type " << int(I.value().getType());
msg.send();
}
if ( theAction == Chars("delete") ) {
ps.deletePackage( theObject, theIndex );
theObject->addPackagesToMenu();
LogMessage msg1;
msg1 << "Package \\\"" << r.getName() <<"\\\" was deleted.";
msg1.send();
} else {
Chars obj_name = theObject->getObjectName();
PackageInfoMessage msg(r.getName(),r.getCommand(),
Packages::getCheckinTypeName(r.getCheckinSelection()),
obj_name);
msg.send();
}
}