青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

Overview

Applications on Symbian OS use a standard set of conventions to name their classes, structs, variables, functions, macros, enumerations, and constants. This topic explains the meaning of these conventions.

 

Class names 

Most class names are formed with a prefix letter C, T, R, or M. Briefly, the meaning of these is as follows: 

  • C: heap-allocated classes, that are derived from a base class CBase

  • T: value classes, that do not own any external object

  • R: resource classes, that contain handles to a real resource which is maintained elsewhere

  • M: interface classes, that define abstract protocol definitions that are implemented by derived classes

    Classes that consist solely of static member functions have no prefix letter. Beyond the prefix, the class name is usually a noun that indicates the purpose of the class.


    Struct names

    Structure types are considered as similar to T classes, as they should not own external objects, and are normally given names beginning with T (although some begin with S).


    Variable names

    Member variables names begin with i, e.g. iMember. This makes it easy to check that certain cleanup-related rules are being obeyed. Arguments names begin with a, e.g. aControl or aIndex. Local variables names have no initial letter. Global variables are usually avoided, but when used, their names begin with a capital letter.

    Symbian OS does not use Hungarian or any notation which attempts to include the variable type in its name: such notations are ugly, and become impossible to manage when there are several hundred classes in the system. They are irrelevant anyway: functions are usually so short that it is easy to see the types of variables defined in them, and class browsers provide a quick way to find the types of class members.


    Function names

    Functions names indicate what they do. They are usually verbs. One exception is getter functions: for a function which returns the value of a member variable, the function name is usually the name of the variable, without the leading i:

    inline RWindow& Window() const { return iWindow; };

    A corresponding setter function would include the word Set, e.g. SetWindow().

    To terminate functions because of error conditions, Symbian OS does not use standard C++ exception handling, but its own system called leaving (see Cleanup Support Overview). Any function that might leave has a name ending in ...L(). This makes the fundamental process of checking for errors easier. The new (ELeave) function might also leave. The fundamental leaving function is User::Leave(). Any function that contains any of these, and does not trap them, might itself leave, and should be coded with a trailing L in its name. If a function calls another which might leave, then its name should have the L suffix also.

    Associated with the leaving mechanism, is the cleanup stack, which allows memory allocated on the heap to be recovered when a leave occurs. An allocation or construction function which places data on the cleanup stack ends with ...LC(). For instance, many new, PushL(), ConstructL() sequences are encapsulated in a NewLC() function:

    CS* s=CS::NewLC(p1, p2);

    This allocates the object, initialises it, and leaves it on the cleanup stack. This process may leave (if only through the PushL()!), so such functions always include an L, and are therefore ...LC().

    A function which takes ownership of its object and destroys it has a name ending in ...D(). An example is the UI framework dialog protocol:

    CEikDialog* dialog=new (ELeave) CBossSettingsDialog;
    if (dialog->ExecuteLD(R_BOSS_SETTINGS_DIALOG))
        {
        // handle successful settings
        }

    The ExecuteLD() function includes second-phase construction, execution of the dialog and then destruction.


    Macro names

    Macro names are all capitalised, with underscores to separates words.


    Enumeration names

    Enumerations are named as follows:

    • as enumerations are types, they have the T prefix
    • enumeration members have the prefix E
    • type and members should have a meaningful, unambiguous name

    Enumerations should be scoped within the relevant class, so as not to pollute the global name space.

    An example of the declaration and use of an enumeration is as follows:

    class TDemo
        {
    public:
        enum TShape {EShapeRound, EShapeSquare};
        };

    TDemo::TShape shape=TDemo::EShapeSquare;



    Constant names

    Names of constants have a prefix K. For example,

    const TInt KMaxNameLength=0x20;

  • Feedback

    # re: Name Conventions for Applications on Symbian OS  回復  更多評論   

    2008-04-27 14:59 by cheney
    支持!

    只有注冊用戶登錄后才能發表評論。
    網站導航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


    posts - 1, comments - 5, trackbacks - 0, articles - 2

    Copyright © cheney

    青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            亚洲乱码国产乱码精品精98午夜| 亚洲欧洲精品一区二区三区不卡| 午夜久久久久久| 亚洲午夜伦理| 国产一区二区精品丝袜| 久久婷婷国产综合精品青草 | 日韩视频免费| 99这里只有精品| 国产精品一区二区在线| 久久一综合视频| 欧美激情在线观看| 午夜精品免费| 久久久夜夜夜| 亚洲一区二区在线免费观看视频 | 欧美黑人国产人伦爽爽爽| 欧美风情在线观看| 午夜精品视频在线| 久久久欧美精品| 宅男噜噜噜66一区二区66| 亚洲一二三四久久| 一区二区三区自拍| 一区二区三区 在线观看视| 国产日韩精品一区二区三区 | 鲁大师影院一区二区三区| 欧美韩日视频| 久久精品国产99国产精品| 欧美成人自拍| 久久精品国产免费| 欧美日韩成人网| 欧美日韩免费在线观看| 久久精品免费播放| 欧美日韩你懂的| 美脚丝袜一区二区三区在线观看 | 国产欧美日韩不卡| 91久久精品日日躁夜夜躁欧美 | 欧美精品999| 久久久久国产精品一区三寸| 欧美精品一区二区高清在线观看| 久久久.com| 国产精品成人一区二区艾草| 欧美成人首页| 国产综合香蕉五月婷在线| 一本一本久久a久久精品综合麻豆 一本一本久久a久久精品牛牛影视 | 日韩一级大片在线| 亚洲电影网站| 欧美一进一出视频| 亚洲综合第一页| 欧美韩国日本综合| 欧美高清不卡| 激情成人中文字幕| 午夜精品久久久久久久99黑人| 亚洲精品资源| 美女精品自拍一二三四| 久久青草欧美一区二区三区| 国产精品久久久久久久一区探花| 亚洲黄色一区| 亚洲欧洲日产国产网站| 久久琪琪电影院| 久久尤物电影视频在线观看| 国产一区二区三区直播精品电影 | 欧美一区二区黄色| 性欧美xxxx大乳国产app| 欧美肉体xxxx裸体137大胆| 亚洲精品视频啊美女在线直播| 亚洲第一页自拍| 美女露胸一区二区三区| 欧美激情片在线观看| 亚洲国产婷婷| 欧美精品久久久久久久| 亚洲精品久久嫩草网站秘色| 亚洲精品一区二区三区婷婷月 | 国产精品一区二区视频| 亚洲少妇最新在线视频| 午夜精品福利在线| 国产欧美日韩精品一区| 欧美在线日韩精品| 美日韩精品视频| 亚洲精品一区在线观看| 欧美日韩精品欧美日韩精品 | 欧美成人tv| 国产精品第十页| 午夜久久影院| 欧美成人国产| 亚洲美女淫视频| 欧美天堂在线观看| 亚洲一区二区精品视频| 久久久久久久久一区二区| 亚洲国产精品久久人人爱蜜臀 | 亚洲免费在线电影| 国产欧美一区二区精品秋霞影院| 久久精品盗摄| 亚洲国产清纯| 亚欧成人在线| 亚洲第一毛片| 欧美日韩直播| 欧美中日韩免费视频| 欧美激情一区二区三区| 亚洲视频大全| 在线成人av.com| 欧美手机在线| 久久综合九色九九| 中文日韩欧美| 亚洲高清一区二| 久久精品亚洲一区二区| 亚洲精品欧美日韩| 国产手机视频精品| 欧美精品一区二| 久久精品天堂| 夜夜嗨av色一区二区不卡| 久久亚洲视频| 亚洲视频999| 最新精品在线| 国内一区二区三区在线视频| 欧美日韩高清在线| 久久久国产午夜精品| 亚洲最新在线视频| 亚洲风情亚aⅴ在线发布| 先锋影音一区二区三区| 日韩视频中午一区| 激情五月综合色婷婷一区二区| 欧美视频日韩视频| 欧美第十八页| 久久天天躁狠狠躁夜夜av| 亚洲影院免费观看| 一本一本久久a久久精品综合妖精| 欧美福利视频在线| 美女91精品| 久久久亚洲综合| 久久精品国产v日韩v亚洲| 亚洲一区二区四区| 中日韩男男gay无套| 亚洲人成网站在线观看播放| 一区二区在线看| 国语对白精品一区二区| 国产一区二区精品久久91| 国产精品亚洲美女av网站| 欧美三级视频在线播放| 欧美日韩国产成人精品| 欧美人与禽性xxxxx杂性| 免费亚洲一区二区| 日韩午夜av在线| 亚洲人体一区| 亚洲日本视频| 99精品国产99久久久久久福利| 亚洲人成网站999久久久综合| 亚洲成色777777在线观看影院| 亚洲午夜精品17c| 亚洲视频免费看| 亚洲在线视频网站| 欧美一区国产一区| 久久九九免费| 欧美不卡激情三级在线观看| 欧美激情成人在线| 亚洲精品一区在线观看| 99热免费精品在线观看| 亚洲一区www| 欧美一区二区私人影院日本| 久久精品人人做人人综合| 久久久水蜜桃| 欧美国产日韩视频| 国产精品成人午夜| 国产欧美精品日韩区二区麻豆天美 | 亚洲天堂av在线免费观看| 亚洲欧美成人一区二区三区| 性久久久久久久久久久久| 久久精品国产精品| 欧美不卡在线视频| 国产精品a级| 红桃视频成人| 一本久久综合亚洲鲁鲁五月天| 午夜久久资源| 麻豆久久婷婷| 一区二区三区国产在线观看| 午夜久久一区| 欧美黄色一区二区| 国产日韩欧美| 亚洲精品视频啊美女在线直播| 亚洲欧美大片| 欧美91大片| 亚洲一区二区三区在线| 久久av最新网址| 欧美视频第二页| 永久免费精品影视网站| 亚洲影院高清在线| 麻豆成人综合网| 亚洲一区二区三区四区中文| 久久天天躁夜夜躁狠狠躁2022| 欧美日韩福利视频| 极品av少妇一区二区| 亚洲香蕉伊综合在人在线视看| 鲁大师影院一区二区三区| 亚洲视频大全| 欧美高清视频在线播放| 国内激情久久| 亚洲欧美在线一区二区| 亚洲国产精品日韩| 久久久久成人精品| 国产欧美亚洲精品| 亚洲尤物影院| 亚洲人成在线观看|