本文整理汇总了C++中detail函数的典型用法代码示例。如果您正苦于以下问题:C++ detail函数的具体用法?C++ detail怎么用?C++ detail使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了detail函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: switch
void CALifeMonsterMovementManager::update ()
{
switch (path_type()) {
case MovementManager::ePathTypeGamePath : {
detail().update ();
break;
};
case MovementManager::ePathTypePatrolPath : {
patrol().update ();
detail().target (
patrol().target_game_vertex_id(),
patrol().target_level_vertex_id(),
patrol().target_position()
);
detail().update ();
break;
};
case MovementManager::ePathTypeNoPath : {
break;
};
default : NODEFAULT;
};
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:26,代码来源:alife_monster_movement_manager.cpp
示例2: fullFileName
void PrePostProcessor::DeleteCleanup(NzbInfo* nzbInfo)
{
if (nzbInfo->GetCleanupDisk() ||
nzbInfo->GetDeleteStatus() == NzbInfo::dsDupe)
{
// download was cancelled, deleting already downloaded files from disk
for (CompletedFile& completedFile: nzbInfo->GetCompletedFiles())
{
BString<1024> fullFileName("%s%c%s", nzbInfo->GetDestDir(), PATH_SEPARATOR, completedFile.GetFilename());
if (FileSystem::FileExists(fullFileName))
{
detail("Deleting file %s", completedFile.GetFilename());
FileSystem::DeleteFile(fullFileName);
}
}
// delete .out.tmp-files
DirBrowser dir(nzbInfo->GetDestDir());
while (const char* filename = dir.Next())
{
int len = strlen(filename);
if (len > 8 && !strcmp(filename + len - 8, ".out.tmp"))
{
BString<1024> fullFilename("%s%c%s", nzbInfo->GetDestDir(), PATH_SEPARATOR, filename);
detail("Deleting file %s", filename);
FileSystem::DeleteFile(fullFilename);
}
}
// delete old directory (if empty)
FileSystem::DeleteDirectory(nzbInfo->GetDestDir());
}
}
开发者ID:sanderjo,项目名称:nzbget,代码行数:33,代码来源:PrePostProcessor.cpp
示例3: object
bool stalker_movement_manager_obstacles::simulate_path_navigation ()
{
Fvector current_position = object().Position();
Fvector previous_position = current_position;
u32 current_travel_point = 0;
while (!detail().completed(current_position,!detail().state_patrol_path(),current_travel_point)) {
m_static_obstacles.on_before_query ();
m_static_obstacles.query (current_position,previous_position);
if (!m_static_obstacles.process_query(false)) {
m_last_fail_time = Device.dwTimeGlobal;
m_failed_to_build_path = true;
restore_current_state ();
return (false);
}
if (m_static_obstacles.need_path_to_rebuild())
return (false);
// float dist_to_target;
// Fvector dir_to_target;
// float distance;
// current_position = path_position(1.f,current_position,check_time_delta,current_travel_point,distance,dist_to_target,dir_to_target);
previous_position = current_position;
current_position = predict_position(check_time_delta,current_position,current_travel_point,1.f);
}
return (true);
}
开发者ID:2asoft,项目名称:xray,代码行数:29,代码来源:stalker_movement_manager_obstacles_path.cpp
示例4: START_PROFILE
void CMovementManager::move_along_path (CPHMovementControl *movement_control, Fvector &dest_position, float time_delta)
{
START_PROFILE("Build Path/Move Along Path")
VERIFY(movement_control);
Fvector motion;
dest_position = object().Position();
float precision = 0.5f;
// Если нет движения по пути
if ( !enabled() ||
!actual() ||
// path_completed() ||
detail().path().empty() ||
detail().completed(dest_position,true) ||
(detail().curr_travel_point_index() >= detail().path().size() - 1) ||
fis_zero(old_desirable_speed())
)
{
m_speed = 0.f;
DBG_PH_MOVE_CONDITIONS( if(ph_dbg_draw_mask.test(phDbgNeverUseAiPhMove)){movement_control->SetPosition(dest_position);movement_control->DisableCharacter();})
if(movement_control->IsCharacterEnabled()) {
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:25,代码来源:movement_manager_physic.cpp
示例5: error
void NntpProcessor::Run()
{
m_connection->SetSuppressErrors(false);
#ifndef DISABLE_TLS
if (m_secureCert && !m_connection->StartTls(false, m_secureCert, m_secureKey))
{
error("Could not establish secure connection to nntp-client: Start TLS failed");
return;
}
#endif
info("[%i] Incoming connection from: %s", m_id, m_connection->GetHost() );
m_connection->WriteLine("200 Welcome (NServ)\r\n");
CharBuffer buf(1024);
int bytesRead = 0;
while (CString line = m_connection->ReadLine(buf, 1024, &bytesRead))
{
line.TrimRight();
detail("[%i] Received: %s", m_id, *line);
if (!strncasecmp(line, "ARTICLE ", 8))
{
m_messageid = line + 8;
m_sendHeaders = true;
ServArticle();
}
else if (!strncasecmp(line, "BODY ", 5))
{
m_messageid = line + 5;
m_sendHeaders = false;
ServArticle();
}
else if (!strncasecmp(line, "GROUP ", 6))
{
m_connection->WriteLine(CString::FormatStr("211 0 0 0 %s\r\n", line + 7));
}
else if (!strncasecmp(line, "AUTHINFO ", 9))
{
m_connection->WriteLine("281 Authentication accepted\r\n");
}
else if (!strcasecmp(line, "QUIT"))
{
detail("[%i] Closing connection", m_id);
m_connection->WriteLine("205 Connection closing\r\n");
break;
}
else
{
warn("[%i] Unknown command: %s", m_id, *line);
m_connection->WriteLine("500 Unknown command\r\n");
}
}
m_connection->SetGracefull(true);
m_connection->Disconnect();
}
开发者ID:sanderjo,项目名称:nzbget,代码行数:58,代码来源:NntpServer.cpp
示例6: detail
void stalker_movement_manager_obstacles::restore_current_state ()
{
if (!m_saved_state)
return;
m_level_path.swap (level_path_path());
m_detail_path.swap (detail().path());
detail().m_current_travel_point = m_detail_current_index;
#ifdef DEBUG
m_detail_key_points.swap (detail().key_points());
#endif // DEBUG
detail().last_patrol_point (m_detail_last_patrol_point);
m_saved_current_iteration.swap (m_static_obstacles.current_iteration());
}
开发者ID:2asoft,项目名称:xray,代码行数:14,代码来源:stalker_movement_manager_obstacles_path.cpp
示例7: timeouts
//
// Database timeouts
// @@@ Incomplete and not satisfactory
//
void timeouts()
{
printf("* Database timeout locks test\n");
CssmAllocator &alloc = CssmAllocator::standard();
ClientSession ss(alloc, alloc);
DLDbIdentifier dbId1(ssuid, "/tmp/one", NULL);
DLDbIdentifier dbId2(ssuid, "/tmp/two", NULL);
DBParameters initialParams1 = { 4, false }; // 4 seconds timeout
DBParameters initialParams2 = { 8, false }; // 8 seconds timeout
// credential to set keychain passphrase
AutoCredentials pwCred(alloc);
StringData password("mumbojumbo");
pwCred += TypedList(alloc, CSSM_SAMPLE_TYPE_KEYCHAIN_CHANGE_LOCK,
new(alloc) ListElement(CSSM_SAMPLE_TYPE_PASSWORD),
new(alloc) ListElement(password));
DbHandle db1 = ss.createDb(dbId1, &pwCred, NULL, initialParams1);
DbHandle db2 = ss.createDb(dbId2, &pwCred, NULL, initialParams2);
detail("Databases created");
// generate a key
const CssmCryptoData seed(StringData("rain tonight"));
FakeContext genContext(CSSM_ALGCLASS_KEYGEN, CSSM_ALGID_DES,
&::Context::Attr(CSSM_ATTRIBUTE_KEY_LENGTH, 64),
&::Context::Attr(CSSM_ATTRIBUTE_SEED, seed),
NULL);
KeyHandle key;
CssmKey::Header header;
ss.generateKey(db1, genContext, CSSM_KEYUSE_ENCRYPT | CSSM_KEYUSE_DECRYPT,
CSSM_KEYATTR_RETURN_REF | CSSM_KEYATTR_PERMANENT,
/*cred*/NULL, NULL, key, header);
ss.generateKey(db2, genContext, CSSM_KEYUSE_ENCRYPT | CSSM_KEYUSE_DECRYPT,
CSSM_KEYATTR_RETURN_REF | CSSM_KEYATTR_PERMANENT,
/*cred*/NULL, NULL, key, header);
detail("Keys generated and stored");
// credential to provide keychain passphrase
AutoCredentials pwCred2(alloc);
pwCred += TypedList(alloc, CSSM_SAMPLE_TYPE_KEYCHAIN_LOCK,
new(alloc) ListElement(CSSM_SAMPLE_TYPE_PASSWORD),
new(alloc) ListElement(password));
//@@@ incomplete
ss.releaseDb(db1);
ss.releaseDb(db2);
}
开发者ID:Apple-FOSS-Mirror,项目名称:securityd,代码行数:52,代码来源:testclient.cpp
示例8: switch
void ScriptController::AddMessage(Message::EKind kind, const char* text)
{
switch (kind)
{
case Message::mkDetail:
detail("%s", text);
break;
case Message::mkInfo:
info("%s", text);
break;
case Message::mkWarning:
warn("%s", text);
break;
case Message::mkError:
error("%s", text);
break;
case Message::mkDebug:
debug("%s", text);
break;
}
}
开发者ID:nzbget,项目名称:nzbget,代码行数:25,代码来源:Script.cpp
示例9: main
int main() {
Database *db = Database::getInstance();
Session *session = Session::getInstance();
while (FCGI_Accept() >= 0) {
Json::FastWriter fw;
Json::Value root;
string result("fail");
string detail("");
session->sessionInit();
vector<unordered_map<string,string> > query_result;
if(session->checkSession() == false){
detail = detail + "unlogin";
}else{
char query_buf[1024] = {0};
string user_id;
user_id = session->getValue("user_id");
<<<<<<< HEAD
snprintf(query_buf,sizeof(query_buf),"select b.no_id, b.type, a.user_id, a.username, b.additional_message, b.created_time from users a INNER JOIN (select * from notification where rece_id = %d and state = 0) b on a.user_id = b.rece_id union select b.no_id, b.type, b.send_id, a.username, b.additional_message, b.created_time from users a INNER JOIN (select * from notification where send_id = %d and state = 1) b on a.user_id = b.send_id",atoi(user_id.c_str()),atoi(user_id.c_str()));
=======
snprintf(query_buf,sizeof(query_buf),"(SELECT no_id,type,send_id,notification.state,username,nickname,created_time,additional_message FROM notification inner join users on users.user_id=send_id where rece_id=%d and notification.state=0) union (SELECT no_id,type,rece_id as send_id,notification.state,username,nickname,created_time,additional_message FROM notification inner join users on users.user_id=rece_id where send_id=%d and notification.state=1)",atoi(user_id.c_str()),atoi(user_id.c_str()));
>>>>>>> 637973e20ec3876ad1a721cb4a71526d24d68c4f
开发者ID:Kallima03,项目名称:cgi_web,代码行数:25,代码来源:get_notification.cpp
示例10: connect
void ArchiveListItem::setArchive(ArchivePtr archive)
{
_archive = archive;
connect(_archive.data(), &Archive::changed, this, &ArchiveListItem::update,
QUEUED);
_ui.nameLabel->setText(_archive->name());
_ui.nameLabel->setToolTip(_archive->name());
QString detail(_archive->timestamp().toString(Qt::DefaultLocaleLongDate));
if(_archive->sizeTotal() != 0)
{
QString size = Utils::humanBytes(_archive->sizeTotal(), _useSIPrefixes,
FIELD_WIDTH);
detail.prepend(size + " ");
}
_ui.detailLabel->setText(detail);
_ui.detailLabel->setToolTip(_archive->archiveStats());
if(_archive->jobRef().isEmpty())
{
_ui.jobButton->hide();
_ui.horizontalLayout->removeWidget(_ui.jobButton);
_ui.archiveButton->show();
_widget->removeAction(_ui.actionGoToJob);
}
else
{
_ui.archiveButton->hide();
_ui.horizontalLayout->removeWidget(_ui.archiveButton);
_ui.jobButton->show();
_widget->insertAction(_ui.actionRestore, _ui.actionGoToJob);
}
}
开发者ID:carriercomm,项目名称:tarsnap-gui,代码行数:34,代码来源:archivelistitem.cpp
示例11: updateDimension
void PictoAction::updateDimension()
{/*{{{*/
qreal posAncre;
pos_ = labels_.at( 1 )->width() + 30;
if( detail() ) {
posAncre = ( labels_.at( 1 )->width() / 2 ) + 15;
if( emptyDetail_ || ( !emptyDetail_ && !labels_.at( 0 )->isEmpty() ) ) {
pos_ += labels_.at( 0 )->width() + 35;
posAncre = labels_.at( 0 )->width() + 50
+ ( labels_.at( 1 )->width() / 2 );
}
if( emptyDetail_ || ( !emptyDetail_ && !labels_.at( 2 )->isEmpty() ) ) {
pos_ += labels_.at( 2 )->width() + 35;
}
} else {
posAncre = ( labels_.at( 1 )->width() / 2 ) + 15;
}
posBottomAnchor_.setX( posAncre );
posUpAnchor_.setX( posAncre );
updateLink();
}/*}}}*/
开发者ID:erebe,项目名称:Tabula_rasa,代码行数:26,代码来源:pictoAction.cpp
示例12: main
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QString filename("unknown");
if (argc == 2) {
filename = argv[1];
}
RWindow window;
QBoxLayout *layout = qobject_cast<QBoxLayout *>(window.layout());
QLabel heading("Could not open file.");
heading.setFont(QFont("Liberation Serif", 30));
layout->addWidget(&heading);
layout->addStrut(8);
QLabel detail(
QString("The file %1 is of an unrecognized type and cannot be opened.")
.arg(runcible::quote(filename)));
detail.setFont(QFont("Liberation Serif", 12));
detail.setWordWrap(true);
layout->addWidget(&detail);
layout->addStretch(1);
QObject::connect(&window, SIGNAL(back()), &app, SLOT(quit()));
window.showMessage("How unfortunate.");
window.showMaximized();
return app.exec();
}
开发者ID:clee,项目名称:runcible,代码行数:33,代码来源:main.cpp
示例13: setLength
void CountProducerWidget::loadPreset(Mlt::Properties& p)
{
if (!p.get("direction") || !p.get("style")) return;
int index = -1;
index = ui->directionCombo->findData(QVariant(p.get("direction")));
ui->directionCombo->setCurrentIndex(index);
index = ui->styleCombo->findData(QVariant(p.get("style")));
ui->styleCombo->setCurrentIndex(index);
index = ui->soundCombo->findData(QVariant(p.get("sound")));
ui->soundCombo->setCurrentIndex(index);
index = ui->backgroundCombo->findData(QVariant(p.get("background")));
ui->backgroundCombo->setCurrentIndex(index);
ui->dropCheckBox->setChecked(p.get("drop"));
ui->durationSpinBox->setValue(p.get_int("length"));
if (m_producer) {
m_producer->set("direction", p.get("direction"));
m_producer->set("style", p.get("style"));
m_producer->set("sound", p.get("sound"));
m_producer->set("background", p.get("background"));
m_producer->set("drop", p.get("drop"));
setLength(producer(), ui->durationSpinBox->value());
m_producer->set(kShotcutDetailProperty, detail().toUtf8().constData());
emit producerChanged(producer());
}
}
开发者ID:bmatherly,项目名称:shotcut,代码行数:32,代码来源:countproducerwidget.cpp
示例14: manager
QT_BEGIN_NAMESPACE_ORGANIZER
/*!
\class QOrganizerTodoOccurrence
\brief The QOrganizerTodoOccurrence class provides an occurrence of a task which should be completed
\inmodule QtOrganizer
\ingroup organizer-items
A todo occurrence is a specific instance of a todo item. An occurrence
which is retrieved from a manager may not actually be persisted in that
manager (for example, it may be generated automatically from the
recurrence rule of the parent todo stored in the manager), in which case
it will have a zero-id and differ from the parent todo only in its start
date. Alternatively, it may be persisted in the manager (that is, the
client has saved the occurrence previously) where it is stored as an exception
to its parent todo.
*/
/*!
Sets the date time at which the task should be started to \a startDateTime. For all-day tasks,
the time part can be set to any valid value.
*/
void QOrganizerTodoOccurrence::setStartDateTime(const QDateTime &startDateTime)
{
QOrganizerTodoTime ttr = detail(QOrganizerItemDetail::TypeTodoTime);
ttr.setStartDateTime(startDateTime);
saveDetail(&ttr);
}
开发者ID:chriadam,项目名称:qtpim,代码行数:28,代码来源:qorganizertodooccurrence.cpp
示例15: detail
void dsp_switch_block::switch_to(int from, int to)
{
dsp_buffer_reader_ptr from_reader = detail()->input(from);
dsp_block_ptr to_block = cast_to_block_ptr( m_down_streams[to].dst().block() );
to_block->detail()->set_input(m_down_streams[to].dst().port(), from_reader);
m_link = to_block;
}
开发者ID:wwwgitcom,项目名称:dsp-eagle,代码行数:7,代码来源:dsp_block.cpp
示例16: detail
void LCDbTest::addMachineDef( const LQuery & defs )
{
MachineDef detail( defs );
if( detail.getSampleType().empty() || detail.getSampleType() == "." )
detail.setSampleType( sampleType );
machineDefs.insert( detail );
}
开发者ID:drkvogel,项目名称:retrasst,代码行数:7,代码来源:LCDbTest.cpp
示例17: manager
QT_BEGIN_NAMESPACE_ORGANIZER
/*!
\class QOrganizerEventOccurrence
\brief The QOrganizerEventOccurrence class provides an occurrence of an event.
\inmodule QtOrganizer
\ingroup organizer-items
An event occurrence is where the occurrence differs from the generating
event in some way. An occurrence which is retrieved from a manager may not
actually be persisted in that manager (for example, it may be generated
automatically from the recurrence rule of the parent event stored in the
manager), in which case it will have a zero-id and differ from the parent
event only in its start date. Alternatively, it may be persisted in the
manager (that is, the client has saved the occurrence previously) where it
is stored as an exception to its parent event.
*/
/*!
Sets the start date time of the event occurrence to \a startDateTime.
For all-day events, the time part is meaningless.
*/
void QOrganizerEventOccurrence::setStartDateTime(const QDateTime &startDateTime)
{
QOrganizerEventTime etr = detail(QOrganizerItemDetail::TypeEventTime);
etr.setStartDateTime(startDateTime);
saveDetail(&etr);
}
开发者ID:chriadam,项目名称:qtpim,代码行数:28,代码来源:qorganizereventoccurrence.cpp
示例18: adhoc
//
// Ad-hoc test area.
// Used for whatever is needed at the moment...
//
void adhoc()
{
printf("* Ad-hoc test sequence (now what does it do *this* time?)\n");
Cssm cssm1;
Cssm cssm2;
cssm1->init();
cssm2->init();
{
Module m1(gGuidAppleCSP, cssm1);
Module m2(gGuidAppleCSP, cssm2);
CSP r1(m1);
CSP r2(m2);
Digest d1(r1, CSSM_ALGID_SHA1);
Digest d2(r2, CSSM_ALGID_SHA1);
StringData foo("foo de doo da blech");
DataBuffer<30> digest1, digest2;
d1.digest(foo, digest1);
d2.digest(foo, digest2);
if (digest1 == digest2)
detail("Digests verify");
else
error("Digests mismatch");
}
cssm1->terminate();
cssm2->terminate();
}
开发者ID:Apple-FOSS-Mirror,项目名称:securityd,代码行数:35,代码来源:testclient.cpp
示例19: documentProcessed
void documentProcessed(const QVersitDocument& document,
QContact* contact)
{
Q_UNUSED(document)
QContactDetail detail(QContactDetail::TypeExtendedDetail);
detail.setValue(0, 2);
contact->saveDetail(&detail);
}
开发者ID:Distrotech,项目名称:qtpim,代码行数:8,代码来源:plugin2.cpp
示例20: documentProcessed
void documentProcessed(const QVersitDocument& document,
QContact* contact)
{
Q_UNUSED(document)
QContactDetail detail("TestDetail");
detail.setValue("Plugin", 3);
contact->saveDetail(&detail);
}
开发者ID:KDE,项目名称:android-qt-mobility,代码行数:8,代码来源:plugin3.cpp
注:本文中的detail函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论