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

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>
            亚洲综合第一| 久久精品99| 亚洲美女中文字幕| 欧美日韩国产精品一区二区亚洲| 亚洲国产精品成人一区二区| 欧美成人情趣视频| 欧美成人日本| 亚洲一区二区精品视频| 亚洲女同精品视频| 国产一区二区0| 欧美国产一区二区| 欧美日韩在线第一页| 欧美在现视频| 久久夜色精品国产| 一区二区成人精品| 香蕉久久夜色精品国产| 亚洲国产精品久久人人爱蜜臀 | 久久视频在线看| 久久久综合香蕉尹人综合网| 亚洲精品一级| 亚洲自拍啪啪| 亚洲人成久久| 亚洲欧美日韩国产精品| 亚洲第一综合天堂另类专| 99香蕉国产精品偷在线观看| 国产精品尤物福利片在线观看| 久久综合色播五月| 欧美视频在线一区二区三区| 久久久精品动漫| 欧美人与性禽动交情品| 久久久噜噜噜久久| 欧美日本三级| 美女性感视频久久久| 欧美视频中文字幕| 欧美激情国产日韩精品一区18| 欧美亚洲成人网| 欧美高清不卡在线| 国产深夜精品| 在线亚洲成人| 艳女tv在线观看国产一区| 欧美在线中文字幕| 先锋亚洲精品| 国产精品ⅴa在线观看h| 亚洲国产91精品在线观看| 国产亚洲高清视频| 一区二区三区国产在线| 最近中文字幕mv在线一区二区三区四区| 亚洲视频中文| 一区二区三区欧美在线观看| 开心色5月久久精品| 久久精品噜噜噜成人av农村| 欧美日韩亚洲成人| 最新日韩在线| 亚洲日本一区二区| 免费永久网站黄欧美| 麻豆精品在线播放| 一区二区三区在线观看欧美| 亚洲欧美日韩一区二区在线| 亚洲视频免费在线观看| 欧美精品二区三区四区免费看视频| 久久永久免费| 一区二区在线不卡| 久久久夜精品| 免费一区二区三区| 亚洲电影免费观看高清完整版在线观看| 午夜精品一区二区三区在线| 亚洲男人av电影| 国产精品三上| 亚洲摸下面视频| 久久精品欧美日韩精品| 国产一区二区久久精品| 久久国产精品99久久久久久老狼| 亚洲欧美日本伦理| 国产精品国产三级国产aⅴ9色| 日韩视频不卡| 亚洲欧美国产制服动漫| 国产精品免费观看在线| 亚洲在线视频一区| 久久久最新网址| 亚洲国产精品久久久久婷婷884| 久久综合九色欧美综合狠狠| 亚洲第一精品福利| 在线视频精品一区| 国产精品久久久久9999高清| 亚洲欧美激情诱惑| 另类天堂av| 一本久道久久久| 国产老肥熟一区二区三区| 久久不射网站| 亚洲国产欧美日韩另类综合| 一本色道88久久加勒比精品| 国产精品s色| 久久riav二区三区| 91久久久久久国产精品| 亚洲中午字幕| 亚洲第一二三四五区| 欧美日韩高清区| 亚洲一区二区三区午夜| 老司机午夜精品| av成人国产| 国产亚洲高清视频| 欧美人与禽性xxxxx杂性| 亚洲欧美日韩国产另类专区| 欧美成人激情在线| 欧美一区二区三区四区视频| 揄拍成人国产精品视频| 欧美日韩中文字幕日韩欧美| 欧美在线观看视频在线| 亚洲精品国产品国语在线app| 午夜免费在线观看精品视频| 亚洲激情网站| 国产伪娘ts一区| 欧美日韩国产成人在线观看| 久久av在线看| 中文久久乱码一区二区| 亚洲高清免费| 久久久久网站| 午夜久久影院| 亚洲手机视频| 亚洲国内在线| 一区二区三区在线高清| 国产精品久久77777| 欧美风情在线| 久久久久五月天| 亚洲女人小视频在线观看| 亚洲欧洲在线视频| 欧美成人中文| 久久久综合网| 久久精品理论片| 亚洲欧美日韩久久精品| 99在线精品视频在线观看| 尤物视频一区二区| 娇妻被交换粗又大又硬视频欧美| 国产精品红桃| 国产精品福利网站| 欧美日韩精品一区二区在线播放| 美国十次成人| 久久久久久一区二区| 欧美专区在线播放| 欧美怡红院视频| 欧美一区二区视频观看视频| 亚洲一区三区视频在线观看| 9色精品在线| 一本不卡影院| 中文久久乱码一区二区| 在线一区二区三区四区| 9l视频自拍蝌蚪9l视频成人| 亚洲人体偷拍| 日韩一区二区精品视频| aaa亚洲精品一二三区| 久久精品国产欧美激情| 美国十次了思思久久精品导航| 欧美一级久久久| 午夜日韩电影| 久久精品国产2020观看福利| 久久国产视频网| 久久亚洲综合网| 欧美国产欧美亚州国产日韩mv天天看完整| 久久亚洲欧美国产精品乐播| 久久一区二区三区国产精品| 老司机久久99久久精品播放免费| 久久综合999| 欧美激情综合五月色丁香| 欧美日韩一区二区免费在线观看 | 香蕉久久a毛片| 久久成人综合网| 免费不卡在线观看| 欧美日韩直播| 国产亚洲精久久久久久| 在线观看亚洲一区| 在线亚洲欧美视频| 欧美一级理论片| 欧美91视频| 99国产精品| 久久精品国产99国产精品澳门| 你懂的一区二区| 国产精品video| 亚洲成人原创| 亚洲欧美日韩精品一区二区| 久久综合中文色婷婷| 亚洲欧洲精品天堂一级| 亚洲欧美一区二区三区久久 | 午夜精品久久久久久久久久久久久| 欧美一区二区视频在线| 美女视频网站黄色亚洲| 欧美特黄一区| 在线看成人片| 欧美在线视频全部完| 亚洲国产精品久久久久秋霞蜜臀 | 免费欧美日韩国产三级电影| 欧美日韩一区在线播放| 一区二区三区在线免费视频| 亚洲视频1区| 欧美大片91| 性欧美在线看片a免费观看| 欧美精品综合| 亚洲大片一区二区三区| 欧美一区二区三区日韩视频| 亚洲乱码国产乱码精品精天堂| 久久精品五月|