本文整理汇总了C++中ic函数的典型用法代码示例。如果您正苦于以下问题:C++ ic函数的具体用法?C++ ic怎么用?C++ ic使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ic函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ic
void AmeGradientButton::setButtonCmd(ButtonCmd c)
{
AmeSystemIcon ic((AmeSystemIcon::IconType)c);
setIcon((QIcon)ic);
cmd = c;
update();
}
开发者ID:admiral0,项目名称:Antico-Deluxe,代码行数:7,代码来源:gradbutton.cpp
示例2: ic
BOOL LASwritePoint::write_chunk_table()
{
if(rank==process_count-1)
{
U32 i;
I64 position = outstream->tell();
if (chunk_table_start_position != -1) // stream is seekable
{
if (!outstream->seek(chunk_table_start_position))
{
return FALSE;
}
if (!outstream->put64bitsLE((U8*)&position))
{
return FALSE;
}
if (!outstream->seek(position) && rank==process_count-1)
{
return FALSE;
}
}
U32 version = 0;
if (!outstream->put32bitsLE((U8*)&version))
{
return FALSE;
}
if (!outstream->put32bitsLE((U8*)&number_chunks))
{
return FALSE;
}
if (number_chunks > 0)
{
enc->init(outstream);
IntegerCompressor ic(enc, 32, 2);
ic.initCompressor();
for (i = 0; i < number_chunks; i++)
{
if (chunk_size == U32_MAX) ic.compress((i ? chunk_sizes[i-1] : 0), chunk_sizes[i], 0);
ic.compress((i ? chunk_bytes[i-1] : 0), chunk_bytes[i], 1);
}
enc->done();
}
if (chunk_table_start_position == -1) // stream is not-seekable
{
if (!outstream->put64bitsLE((U8*)&position))
{
return FALSE;
}
}
}
return TRUE;
}
开发者ID:jwend,项目名称:p_laszip,代码行数:60,代码来源:laswritepoint.cpp
示例3: OpenStatus
void PASCAL OpenStatus(HWND hUIWnd)
{
POINT ptPos;
#define STATE_WIDTH 32
#define STATE_HEIGHT 32
ptPos.x = get_wa_rect().right - STATE_WIDTH;
ptPos.y = get_wa_rect().bottom - STATE_HEIGHT;
if (!get_status_wnd(hUIWnd)) {
HWND stat = CreateWindowEx(WS_EX_TOPMOST|WS_EX_TRANSPARENT, get_status_class_name().c_str(), NULL, WS_POPUP | WS_DISABLED,
ptPos.x, ptPos.y, STATE_WIDTH, STATE_HEIGHT,
hUIWnd, (HMENU) NULL, g_hInst, NULL);
//ModifyStyleEx
SetWindowLong (stat, GWL_EXSTYLE ,
GetWindowLong (stat , GWL_EXSTYLE ) | WS_EX_LAYERED);
SetLayeredWindowAttributes(stat,
RGB(255, 255, 255),
100,
LWA_COLORKEY|LWA_ALPHA);
set_status_wnd(hUIWnd, stat);
}
input_context ic(hUIWnd);
if (!ic) {
hide_status_wnd(hUIWnd);
} else {
show_status_wnd(hUIWnd);
}
return;
}
开发者ID:CodeBees,项目名称:windows-config,代码行数:34,代码来源:statusui.cpp
示例4: test
void
test()
{
std::complex<T> c;
const std::complex<T> c2(1.5, 2.5);
assert(c.real() == 0);
assert(c.imag() == 0);
c += c2;
assert(c.real() == 1.5);
assert(c.imag() == 2.5);
c += c2;
assert(c.real() == 3);
assert(c.imag() == 5);
std::complex<T> c3;
c3 = c;
std::complex<int> ic (1,1);
c3 += ic;
assert(c3.real() == 4);
assert(c3.imag() == 6);
c3 = c;
std::complex<float> fc (1,1);
c3 += fc;
assert(c3.real() == 4);
assert(c3.imag() == 6);
}
开发者ID:32bitmicro,项目名称:riscv-libcxx,代码行数:28,代码来源:plus_equal_complex.pass.cpp
示例5: throw
/** Method fills-in all additional properties requested by user and not defined
*by matrix workspace itself.
* it fills in [nd - (1 or 2 -- depending on emode)] values into Coord vector;
*
*@param Coord -- input-output vector of MD-coordinates
*@param nd -- number of current dimensions
*
*@returns -- Coord vector with nd-(1 or 2, depending on emode) values of MD
*coordinates
*/
bool MDTransfModQ::calcGenericVariables(std::vector<coord_t> &Coord,
size_t nd) {
// sanity check. If fails, something went fundamentally wrong
if (m_NMatrixDim + m_AddDimCoordinates.size() != nd) {
std::string ERR =
"Number of matrix dimensions: " +
boost::lexical_cast<std::string>(m_NMatrixDim) +
" plus number of additional dimensions: " +
boost::lexical_cast<std::string>(m_AddDimCoordinates.size()) +
" not equal to number of workspace dimensions: " +
boost::lexical_cast<std::string>(nd);
throw(std::invalid_argument(ERR));
}
// in Elastic case, 1 coordinate (|Q|) came from workspace
// in inelastic 2 coordinates (|Q| dE) came from workspace. All other are
// defined by properties.
// m_NMatrixDim is either 1 in elastic case or 2 in inelastic
size_t ic(0);
for (size_t i = m_NMatrixDim; i < nd; i++) {
if (m_AddDimCoordinates[ic] < m_DimMin[i] ||
m_AddDimCoordinates[ic] >= m_DimMax[i])
return false;
Coord[i] = m_AddDimCoordinates[ic];
ic++;
}
return true;
}
开发者ID:Mantid-Test-Account,项目名称:mantid,代码行数:38,代码来源:MDTransfModQ.cpp
示例6: Domain
PatchView::PatchView(MainImpl* mi, Git* g) : Domain(mi, g, false) {
patchTab = new Ui_TabPatch();
patchTab->setupUi(container);
SCRef ic(QString::fromUtf8(":/icons/resources/plusminus.png"));
patchTab->buttonFilterPatch->setIcon(QIcon(ic));
QButtonGroup* bg = new QButtonGroup(this);
bg->addButton(patchTab->radioButtonParent, DIFF_TO_PARENT);
bg->addButton(patchTab->radioButtonHead, DIFF_TO_HEAD);
bg->addButton(patchTab->radioButtonSha, DIFF_TO_SHA);
connect(bg, SIGNAL(buttonClicked(int)), this, SLOT(button_clicked(int)));
patchTab->textBrowserDesc->setup(this);
patchTab->textEditDiff->setup(this, git);
patchTab->fileList->setup(this, git);
connect(m(), SIGNAL(typeWriterFontChanged()),
patchTab->textEditDiff, SLOT(typeWriterFontChanged()));
connect(m(), SIGNAL(changeFont(const QFont&)),
patchTab->fileList, SLOT(on_changeFont(const QFont&)));
connect(patchTab->lineEditDiff, SIGNAL(returnPressed()),
this, SLOT(lineEditDiff_returnPressed()));
connect(patchTab->fileList, SIGNAL(contextMenu(const QString&, int)),
this, SLOT(on_contextMenu(const QString&, int)));
connect(patchTab->buttonFilterPatch, SIGNAL(clicked()),
this, SLOT(buttonFilterPatch_clicked()));
}
开发者ID:MBARI-ESP,项目名称:qgit,代码行数:32,代码来源:patchview.cpp
示例7: ic
void Field::check_access_by(InstanceClass* sender_class,
InstanceClass* static_receiver_class,
FailureMode fail_mode JVM_TRAPS) {
InstanceClass* field_class = ic();
if (is_public()) {
return;
}
if (field_class->equals(sender_class)) {
return;
}
if (!is_private()) {
if (field_class->is_same_class_package(sender_class)) {
return;
}
if (is_protected()) {
if (sender_class->is_subclass_of(field_class)) {
if (static_receiver_class->equals(sender_class) ||
static_receiver_class->is_subclass_of(sender_class) ||
sender_class->is_subclass_of(static_receiver_class)) {
return;
}
}
}
}
Throw::illegal_access(fail_mode JVM_NO_CHECK_AT_BOTTOM);
}
开发者ID:jiangxilong,项目名称:yari,代码行数:26,代码来源:Field.cpp
示例8: AplusLabelOut
AplusFuncLabel::AplusFuncLabel(A a_, AplusLabelOut *alo_) : AplusLabelOut()
{
if (alo_!=0 && alo_->outFunc()!=0)
{
outFunc(alo_->outFunc());
v(alo_->v());
}
if (alo_!=0 && alo_->format()!=AplusFormatter::BadFormat)
{
format(alo_->format());
precision(alo_->precision());
}
if (verify(a_)==MSTrue)
{
a((A) ic(a_));
}
else
{
MSStringVector emptyStringVector;
a((A)0);
tick((A)0);
grid((A)0);
value((A)0);
labels(emptyStringVector);
}
}
开发者ID:PlanetAPL,项目名称:a-plus,代码行数:28,代码来源:AplusLabelOut.C
示例9: ic
/**
build the list of spectra to load and include into spectra-detectors map
@param range_supplied -- if true specifies that the range of values provided
below have to be processed rather then spectra list
@param range_min -- min value for spectra-ID to load
@param range_max -- max value for spectra-ID to load
@param spec_list -- list of spectra numbers to load
@param SpectraExcluded -- set of the spectra ID-s to exclude from loading
**/
void LoadISISNexus2::buildSpectraInd2SpectraNumMap(
bool range_supplied, int64_t range_min, int64_t range_max,
const std::vector<int64_t> &spec_list,
const std::map<int64_t, std::string> &SpectraExcluded) {
int64_t ic(0);
if (spec_list.size() > 0) {
ic = 0;
auto start_point = spec_list.begin();
for (auto it = start_point; it != spec_list.end(); it++) {
specid_t spec_num = static_cast<specid_t>(*it);
if (SpectraExcluded.find(spec_num) == SpectraExcluded.end()) {
m_specInd2specNum_map.insert(
std::pair<int64_t, specid_t>(ic, spec_num));
ic++;
}
}
} else {
if (range_supplied) {
ic = 0;
for (int64_t i = range_min; i < range_max + 1; i++) {
specid_t spec_num = static_cast<specid_t>(i);
if (SpectraExcluded.find(spec_num) == SpectraExcluded.end()) {
m_specInd2specNum_map.insert(
std::pair<int64_t, specid_t>(ic, spec_num));
ic++;
}
}
}
}
}
开发者ID:stothe2,项目名称:mantid,代码行数:42,代码来源:LoadISISNexus2.cpp
示例10: td
Z I td(A a,A w,I i)
{
A z;
ND2 I0
{
I wt=w->t,wr=w->r,*wd=w->d;
I j= *wd,k,m=*a->p;
if(!wr)
j=1,++wr;
if(i==26)
m=m>0?(m>j?0:m-j):m<-j?0:m+j;
k=tr(wr-1,wd+1);
u=v=0;
t=wt;
if(m<0)
if(m= -m,m>j)
u=(j-m)*k;
else
v=(j-m)*k;
else
if(m>j)
u=(m-j)*k;
else
if(wt<Ct&&w->c==1&&m)
R g=(PFI)k1,w->n=(*w->d=m)*k,ic(w);
W(ga(wt,wr,m*k,wd))*z->d=m;
C2(k1)
}
}
开发者ID:PlanetAPL,项目名称:a-plus,代码行数:29,代码来源:f.c
示例11: PaintStatusWindow
static void PaintStatusWindow(HWND hWnd, HDC hdc)
{
CRect rect;
GetClientRect(hWnd, &rect);
//hdc_with_font dc_lucida(hdc, L"Lucida Console", 12);
// hdc = GetDC(NULL);
// CPoint pt = rect.TopLeft();
// ClientToScreen(hWnd, &pt);
// rect.OffsetRect(pt);
wstring name = to_wstring(g_ime_name);
HWND hUIWnd = GetWindow(hWnd, GW_OWNER);
input_context ic(hUIWnd);
if (!ic || !ic->hWnd) {
DrawText(hdc, name.c_str(), name.size(), &rect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
} else {
HWND hWnd = ic->hWnd;
while (GetParent(hWnd) && GetParent(hWnd) != hWnd) {
hWnd = GetParent(hWnd);
}
HICON icon = GetWindowIcons(hWnd);
SetBkColor(hdc, RGB(254, 254, 255));
SetTextColor(hdc, RGB(22, 1, 33));
DrawIconEx (hdc, 0, 0, icon, rect.Width(), rect.Height(), 0, NULL, DI_NORMAL);
}
}
开发者ID:CodeBees,项目名称:windows-config,代码行数:31,代码来源:statusui.cpp
示例12: callTagLSRefinementCellsCallbackFunction
void
callTagLSRefinementCellsCallbackFunction(const Pointer<BasePatchHierarchy<NDIM> > hierarchy,
const int level_number,
const double /*error_data_time*/,
const int tag_index,
const bool initial_time,
const bool /*uses_richardson_extrapolation_too*/,
void* ctx)
{
if (initial_time) return;
TagLSRefinementCells* ptr_ls_tagger = static_cast<TagLSRefinementCells*>(ctx);
TBOX_ASSERT(hierarchy);
TBOX_ASSERT((level_number >= 0) && (level_number <= hierarchy->getFinestLevelNumber()));
TBOX_ASSERT(hierarchy->getPatchLevel(level_number));
// Get the current level set information
VariableDatabase<NDIM>* var_db = VariableDatabase<NDIM>::getDatabase();
const int ls_current_idx = var_db->mapVariableAndContextToIndex(
ptr_ls_tagger->d_ls_gas_var, ptr_ls_tagger->d_adv_diff_solver->getCurrentContext());
// Tag cells based on the value of the level set variable
Pointer<PatchLevel<NDIM> > level = hierarchy->getPatchLevel(level_number);
for (PatchLevel<NDIM>::Iterator p(level); p; p++)
{
Pointer<Patch<NDIM> > patch = level->getPatch(p());
const Box<NDIM>& patch_box = patch->getBox();
Pointer<CellData<NDIM, int> > tags_data = patch->getPatchData(tag_index);
Pointer<CellData<NDIM, double> > ls_data = patch->getPatchData(ls_current_idx);
for (CellIterator<NDIM> ic(patch_box); ic; ic++)
{
const hier::Index<NDIM>& i = ic();
const double dist_norm = (*ls_data)(i)-ptr_ls_tagger->d_tag_value;
// Note that this ensures that the inside of the water is tagged as well
if (dist_norm <= ptr_ls_tagger->d_tag_abs_thresh)
{
(*tags_data)(i) = 1;
}
}
}
return;
} // callTagLSRefinementCellsCallBackFunction
开发者ID:IBAMR,项目名称:IBAMR,代码行数:47,代码来源:TagLSRefinementCells.cpp
示例13: vfscanf
int vfscanf(FILE *fp, char *fmt, va_list ap)
{
int ret = 0;
int t, c;
int wid = 1 << 20;
while (*fmt) {
while (isspace((unsigned char) *fmt))
fmt++;
while (isspace(c = ic(fp)))
;
ungetc(c, fp);
while (*fmt && *fmt != '%' && !isspace((unsigned char) *fmt))
if (*fmt++ != ic(fp))
return ret;
if (*fmt != '%')
continue;
fmt++;
if (isdigit((unsigned char) *fmt)) {
wid = 0;
while (isdigit((unsigned char) *fmt))
wid = wid * 10 + *fmt++ - '0';
}
t = sizeof(int);
while (*fmt == 'l') {
t = sizeof(long);
fmt++;
}
while (*fmt == 'h') {
t = t < sizeof(int) ? sizeof(char) : sizeof(short);
fmt++;
}
switch (*fmt++) {
case 'u':
case 'd':
if (iint(fp, va_arg(ap, long *), t, wid))
return ret;
ret++;
break;
case 's':
if (istr(fp, va_arg(ap, char *), wid))
return ret;
ret++;
break;
}
}
return ret;
}
开发者ID:certik,项目名称:neatlibc,代码行数:47,代码来源:scanf.c
示例14: colIcon
void SheetBgColorStep::redo()
{
QPixmap colIcon(32, 32);
colIcon.fill(newColor);
QIcon ic(colIcon);
mainWindow->getUI()->sheetBgColSelect->setIcon(ic);
mainWindow->getSheet()->setBgCol(newColor);
}
开发者ID:meh2481,项目名称:SpriteSheeter,代码行数:8,代码来源:SheetBgColorStep.cpp
示例15: QDialog
passwordDialog::passwordDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::passwordDialog)
{
ui->setupUi(this);
QIcon ic("./ico/LOCK.png");
ui->label_4->setPixmap(ic.pixmap(48,48));
}
开发者ID:Pihail,项目名称:fileManagerProject,代码行数:8,代码来源:passworddialog.cpp
示例16: main
int main(int argc, char** argv)
{
ros::init(argc, argv, "img2dir");
img2dir::Nh nh;
img2dir::Img2dir ic(nh);
ros::spin();
return 0;
}
开发者ID:SV-ROS,项目名称:srrc_img2dir,代码行数:8,代码来源:img2dir_node.cpp
示例17: main
int main(){
Simple_window win(Point(100, 100), 600, 400, "Immobile_Circle");
Immobile_Circle ic(Point(300, 200), 200);
win.attach(ic);
win.wait_for_button();
}
开发者ID:k-mi,项目名称:Stroustrup_PPP,代码行数:8,代码来源:q14_4.cpp
示例18: QToolButton
AmeGradientButton::AmeGradientButton(const ButtonCmd c, QWidget *parent)
: QToolButton(parent)
{
AmeSystemIcon ic((AmeSystemIcon::IconType)c);
setIcon(QIcon(ic));
cmd = c;
w1 = 22;
setGroupPosition(LeftButton);
}
开发者ID:admiral0,项目名称:Antico-Deluxe,代码行数:9,代码来源:gradbutton.cpp
示例19: _clientData
AipcAttributes::AipcAttributes(AipcAttributes &src_)
: _clientData((A)ic(src_.clientData())),
_flagAttrs(src_._flagAttrs),
_readPriority(src_._readPriority),
_writePriority(src_._writePriority),
_readBufsize(src_._readBufsize),
_writeBufsize(src_._writeBufsize),
_listener(src_._listener)
{}
开发者ID:PlanetAPL,项目名称:a-plus,代码行数:9,代码来源:AipcAttributes.C
示例20: main
int main( int argc, char *argv[] )
{
neuralnetwork::IConnection ic( 1.0 );
neuralnetwork::CPerceptron cp;
cp.addInputConnection( & ic );
cp.inputEvent( & ic, 2.0 );
std::cout << "No stack overflow here!" << std::endl;
return 0;
}
开发者ID:CCJY,项目名称:coliru,代码行数:9,代码来源:main.cpp
注:本文中的ic函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论