• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Get_Integer函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中Get_Integer函数的典型用法代码示例。如果您正苦于以下问题:C++ Get_Integer函数的具体用法?C++ Get_Integer怎么用?C++ Get_Integer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了Get_Integer函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: P_Chown

static Object P_Chown(Object fn, Object uid, Object gid) {
#ifndef WIN32
    if (chown(Get_Strsym(fn), Get_Integer(uid), Get_Integer(gid)) == -1)
        Raise_System_Error1("~s: ~E", fn);
#endif
    return Void;
}
开发者ID:s-cherepanov,项目名称:elk,代码行数:7,代码来源:file.c


示例2: P_Create_Pixmap

static Object P_Create_Pixmap (Object d, Object w, Object h, Object depth) {
    Display *dpy;
    Drawable dr = Get_Drawable (d, &dpy);

    return Make_Pixmap (dpy, XCreatePixmap (dpy, dr, Get_Integer (w),
                                            Get_Integer (h), Get_Integer (depth)));
}
开发者ID:s-cherepanov,项目名称:elk,代码行数:7,代码来源:pixmap.c


示例3: P_Create_Cursor

static Object P_Create_Cursor (Object srcp, Object maskp, Object x, Object y,
                               Object f, Object b) {
    Pixmap sp = Get_Pixmap (srcp), mp;
    Display *d = PIXMAP(srcp)->dpy;

    mp = EQ(maskp, Sym_None) ? None : Get_Pixmap (maskp);
    return Make_Cursor (d, XCreatePixmapCursor (d, sp, mp,
        Get_Color (f), Get_Color (b), Get_Integer (x), Get_Integer (y)));
}
开发者ID:s-cherepanov,项目名称:elk,代码行数:9,代码来源:cursor.c


示例4: P_Create_Glyph_Cursor

static Object P_Create_Glyph_Cursor (Object srcf, Object srcc, Object maskf,
                                     Object maskc, Object f, Object b) {
    Font sf = Get_Font (srcf), mf;
    Display *d = FONT(srcf)->dpy;

    mf = EQ(maskf, Sym_None) ? None : Get_Font (maskf);
    return Make_Cursor (d, XCreateGlyphCursor (d, sf, mf,
        Get_Integer (srcc), mf == None ? 0 : Get_Integer (maskc),
        Get_Color (f), Get_Color (b)));
}
开发者ID:s-cherepanov,项目名称:elk,代码行数:10,代码来源:cursor.c


示例5: P_Create_Bitmap_From_Data

static Object P_Create_Bitmap_From_Data (Object win, Object data, Object pw,
        Object ph) {
    register unsigned int w, h;

    Check_Type (win, T_Window);
    Check_Type (data, T_String);
    w = Get_Integer (pw);
    h = Get_Integer (ph);
    if (w * h > 8 * STRING(data)->size)
        Primitive_Error ("bitmap too small");
    return Make_Pixmap (WINDOW(win)->dpy,
                        XCreateBitmapFromData (WINDOW(win)->dpy, WINDOW(win)->win,
                                STRING(data)->data, w, h));
}
开发者ID:s-cherepanov,项目名称:elk,代码行数:14,代码来源:pixmap.c


示例6: P_Create_Window

static Object P_Create_Window (Object parent, Object x, Object y, Object width,
                               Object height, Object border_width,
                               Object attr) {
    unsigned long mask;
    Window win;

    Check_Type (parent, T_Window);
    mask = Vector_To_Record (attr, Set_Attr_Size, Sym_Set_Attr, Set_Attr_Rec);
    if ((win = XCreateWindow (WINDOW(parent)->dpy, WINDOW(parent)->win,
            Get_Integer (x), Get_Integer (y), Get_Integer (width),
            Get_Integer (height), Get_Integer (border_width),
            CopyFromParent, CopyFromParent, CopyFromParent, mask, &SWA)) == 0)
        Primitive_Error ("cannot create window");
    return Make_Window (1, WINDOW(parent)->dpy, win);
}
开发者ID:s-cherepanov,项目名称:elk,代码行数:15,代码来源:window.c


示例7: P_Mkdir

static Object P_Mkdir(Object fn, Object mode) {
#ifndef WIN32
    if (mkdir(Get_Strsym(fn), Get_Integer(mode)) == -1)
        Raise_System_Error1("~s: ~E", fn);
#endif
    return Void;
}
开发者ID:s-cherepanov,项目名称:elk,代码行数:7,代码来源:file.c


示例8: Show_Message

void IntControl::Read_Deletes (void)
{
    int node;

    //---- store the delete data ----

    Show_Message ("Reading %s -- Record", delete_file.File_Type ());
    Set_Progress ();

    while (delete_file.Read ()) {
        Show_Progress ();

        Get_Integer (delete_file.Record (), &node);
        if (node == 0) continue;

        if (!delete_node.Add (node)) {
            Error ("Adding Delete Node Record");
        }
    }
    End_Progress ();

    delete_file.Close ();

    Print (2, "Number of %s Records = %d", delete_file.File_Type (), Progress_Count ());
}
开发者ID:kravitz,项目名称:transims4,代码行数:25,代码来源:Read_Deletes.cpp


示例9: P_Write_Bitmap_File

static Object P_Write_Bitmap_File (int argc, Object *argv) {
    Pixmap pm;
    int ret, xhot = -1, yhot = -1;

    pm = Get_Pixmap (argv[1]);
    if (argc == 5)
        Primitive_Error ("both x-hot and y-hot must be specified");
    if (argc == 6) {
        xhot = Get_Integer (argv[4]);
        yhot = Get_Integer (argv[5]);
    }
    Disable_Interrupts;
    ret = XWriteBitmapFile (PIXMAP(argv[1])->dpy, Get_Strsym (argv[0]), pm,
                            Get_Integer (argv[2]), Get_Integer (argv[3]), xhot, yhot);
    Enable_Interrupts;
    return Bits_To_Symbols ((unsigned long)ret, 0, Bitmapstatus_Syms);
}
开发者ID:s-cherepanov,项目名称:elk,代码行数:17,代码来源:pixmap.c


示例10: Expr_Eval_Int

GLOBAL int Expr_Eval_Int(const char *str, const parser_extra* f, int *result)
{
	int err;
	expr_val e;

	e = Expr_Eval(str, f, &err);
	if (err == EXPR_EVAL_SUCCESS) *result = Get_Integer(e);

	return err;
}
开发者ID:jogi1,项目名称:camquake,代码行数:10,代码来源:parser.c


示例11: P_Translate_Coordinates

static Object P_Translate_Coordinates (Object src, Object x, Object y,
                                       Object dst) {
    int rx, ry;
    Window child;
    Object l, t, z;
    GC_Node3;

    Check_Type (src, T_Window);
    Check_Type (dst, T_Window);
    if (!XTranslateCoordinates (WINDOW(src)->dpy, WINDOW(src)->win,
            WINDOW(dst)->win, Get_Integer (x), Get_Integer (y), &rx, &ry,
            &child))
        return False;
    l = t = P_Make_List (Make_Integer (3), Null);
    GC_Link3 (l, t, dst);
    Car (t) = Make_Integer (rx); t = Cdr (t);
    Car (t) = Make_Integer (ry), t = Cdr (t);
    z = Make_Window (0, WINDOW(dst)->dpy, child);
    Car (t) = z;
    GC_Unlink;
    return l;
}
开发者ID:s-cherepanov,项目名称:elk,代码行数:22,代码来源:window.c


示例12: Show_Message

void CheckSurvey::Survey_Weights (void)
{
	int id, count;
	double weight;
	char *str_ptr;

	Household_Data *household_ptr;

	count = 0;

	//---- read the survey household weights ----

	Show_Message ("Reading %s -- Record", weight_file.File_Type ());
	Set_Progress (50000);
	
	while (weight_file.Read ()) {
		str_ptr = weight_file.Record ();

		//---- check the household id ----

		str_ptr = Get_Integer (str_ptr, &id);
		if (id <= 0) continue;

		Show_Progress ();

		household_ptr = survey_hh_data.Get (id);
		if (household_ptr == NULL) continue;

		Get_Double (str_ptr, &weight);

		household_ptr->Location ((int) (weight + random.Probability ()));
		count++;
	}
	End_Progress ();
	weight_file.Close ();

	Print (2, "Number of %s Records = %d", weight_file.File_Type (), Progress_Count ());

	if (count != Progress_Count ()) {
		Print (1, "Number of Household Weights Kept = %d", count);
	}
}
开发者ID:kravitz,项目名称:transims4,代码行数:42,代码来源:Survey_Weights.cpp


示例13: Show_Message

void PlanSum::Read_HHList (void)
{
	int nfile, hhold;

	//---- read the household list files ----

	for (nfile=0; ; nfile++) {
		if (!hhlist_file.Open (nfile)) break;

		if (hhlist_file.Extend ()) {
			Show_Message ("Reading %s %s -- Record", hhlist_file.File_Type (), hhlist_file.Extension ());
		} else {
			Show_Message ("Reading %s -- Record", hhlist_file.File_Type ());
		}
		Set_Progress ();

		//---- store the household list ----

		while (hhlist_file.Read ()) {
			Show_Progress ();

			Get_Integer (hhlist_file.Record (), &hhold);

			if (hhold <= 0) continue;

			if (!hhold_list.Add (hhold)) {
				Error ("Adding Household %d", hhold);
			}
		}
		End_Progress ();

		hhlist_file.Close ();
	}
	hhold = hhold_list.Num_Records ();

	hhold_list.Max_Records (hhold);
	
	Print (2, "Number of Household List Records = %d", hhold);
}
开发者ID:kravitz,项目名称:transims4,代码行数:39,代码来源:Read_HHList.cpp


示例14: Dir

	int    Dir (void)                 { return (Get_Integer (dir)); }
开发者ID:kravitz,项目名称:transims5,代码行数:1,代码来源:Toll_File.hpp


示例15: Link

	int    Link (void)                { return (Get_Integer (link)); }
开发者ID:kravitz,项目名称:transims5,代码行数:1,代码来源:Toll_File.hpp


示例16: Route

	int    Route (void)               { return (Get_Integer (route)); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Traveler_File.hpp


示例17: Lane

	int    Lane (void)                { return (Get_Integer (lane)); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Traveler_File.hpp


示例18: Mode

	int    Mode (void)                { return (Get_Integer (mode)); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Traveler_File.hpp


示例19: Trip

	int    Trip (void)                { return (Get_Integer (trip)); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Traveler_File.hpp


示例20: Person

	int    Person (void)              { return (Get_Integer (person)); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Traveler_File.hpp



注:本文中的Get_Integer函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Get_L4函数代码示例发布时间:2022-05-30
下一篇:
C++ Get_Count函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap