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

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
    支持!

    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>
            免费看成人av| 亚洲免费一级电影| 欧美日韩国产成人在线免费| 老司机精品导航| 欧美成人精品在线| 欧美韩日一区二区三区| 欧美日韩一二三四五区| 国产精品日韩在线一区| 国产午夜精品一区理论片飘花| 国产精品日韩欧美大师| 在线欧美影院| 一区二区不卡在线视频 午夜欧美不卡在| 亚洲免费电影在线| 香蕉久久一区二区不卡无毒影院 | 亚洲精品乱码久久久久久按摩观| 欧美大香线蕉线伊人久久国产精品| 麻豆九一精品爱看视频在线观看免费| 欧美国产在线电影| 国产精品国产成人国产三级| 国产精品一区毛片| 亚洲精品网站在线播放gif| 亚洲一区二区黄色| 久久综合色8888| 亚洲免费激情| 久久久久久一区| 欧美色视频在线| 亚洲二区精品| 久久久国产精品一区| 亚洲开发第一视频在线播放| 久久精品二区亚洲w码| 国产精品福利在线观看| 亚洲区中文字幕| 免费av成人在线| 午夜伦欧美伦电影理论片| 久久国产主播精品| 国内精品久久久久久久97牛牛| 亚洲精品一区二区三区樱花| 久久久久国产精品厨房| av成人老司机| 欧美大片一区| 精品999成人| 99亚洲伊人久久精品影院红桃| 久久亚洲精选| 亚洲一二三区在线| 欧美精品亚洲精品| 亚洲精品在线看| 久久伊人精品天天| 亚洲欧美日韩一区二区在线 | 亚洲欧洲一区二区天堂久久| 先锋亚洲精品| 欧美日韩国产页| 亚洲成人影音| 久久免费观看视频| 亚洲免费人成在线视频观看| 欧美日韩在线高清| 亚洲久久一区二区| 欧美韩日亚洲| 美女91精品| 国产欧美一区二区在线观看| 亚洲午夜高清视频| 91久久在线观看| 久久久久久夜| 亚洲日本成人| 欧美成人中文| 久久躁狠狠躁夜夜爽| 极品裸体白嫩激情啪啪国产精品| 欧美诱惑福利视频| 亚洲综合成人在线| 国产日韩欧美在线播放不卡| 亚洲欧美成人一区二区在线电影 | 久久国产手机看片| 亚洲桃色在线一区| 国产美女精品人人做人人爽| 亚洲一区二区三区四区视频| 一本色道久久综合狠狠躁的推荐| 欧美国产91| 99精品免费网| 亚洲狼人精品一区二区三区| 免费观看亚洲视频大全| 亚洲国产精品一区二区尤物区| 欧美成人激情在线| 免费日韩视频| 亚洲视频 欧洲视频| 一区二区三区黄色| 国产精品日韩一区| 久久久久久夜| 久久一区二区三区av| 99精品热6080yy久久| 一区二区三区国产在线| 亚洲精品三级| 一区二区三区.www| 国产视频一区二区三区在线观看| 销魂美女一区二区三区视频在线| 欧美在线二区| 亚洲精品久久久久久下一站| 亚洲一区二区精品在线观看| 国产综合在线视频| 一本到高清视频免费精品| 国产主播精品| 99精品黄色片免费大全| 国产偷自视频区视频一区二区| 毛片一区二区| 国产精品免费一区豆花| 麻豆乱码国产一区二区三区| 欧美黄色日本| 久久免费国产| 国产精品久久久久9999高清| 欧美国产精品专区| 国产日韩欧美综合在线| 欧美二区视频| 国产欧美一区二区三区沐欲| 亚洲欧洲精品一区二区三区不卡| 国产女人精品视频| 亚洲成人中文| 国产一区二区三区四区在线观看 | 国产精品xnxxcom| 牛牛国产精品| 国内精品视频一区| 一区二区三区www| 精品电影在线观看| 亚洲午夜激情| 日韩一级片网址| 麻豆成人综合网| 久久久国产精品一区二区三区| 欧美黄色大片网站| 亚洲东热激情| 国内外成人免费激情在线视频| 一区二区欧美国产| 亚洲一区二区三区成人在线视频精品| 美女精品网站| 美女主播一区| 好吊视频一区二区三区四区| 亚洲一区免费看| 亚洲一区二区毛片| 欧美精品一区二区三区视频| 亚洲国产精品久久| 在线观看精品| 免费高清在线一区| 欧美成人亚洲成人日韩成人| 在线播放视频一区| 欧美大胆人体视频| 欧美sm重口味系列视频在线观看| 国产日韩欧美精品一区| 午夜在线精品偷拍| 午夜精品一区二区三区在线播放| 国产精品jvid在线观看蜜臀 | 一区二区三区免费在线观看| 欧美激情一区二区三区四区| 亚洲国产网站| 欧美在线观看网站| 在线观看视频欧美| 亚洲综合视频1区| 午夜亚洲视频| 国产精品网站一区| 亚洲一区二区三区精品动漫| 欧美一区二区三区视频在线| 欧美色123| 亚洲影院在线观看| 久久夜色精品国产噜噜av| 精品福利电影| 欧美精品在线视频观看| 亚洲午夜精品网| 久久色在线播放| 91久久在线播放| 国产精品九色蝌蚪自拍| 欧美在线视频二区| 99re66热这里只有精品3直播 | 久久久噜噜噜久噜久久| 国产亚洲欧美一区二区三区| 久久综合中文| 亚洲午夜在线| 欧美激情在线播放| 久久激情视频免费观看| 日韩视频不卡中文| 国产亚洲欧美aaaa| 欧美日韩一区二区三区高清| 欧美一区二区啪啪| 亚洲人午夜精品| 老司机午夜免费精品视频| 亚洲免费观看视频| 国产裸体写真av一区二区| 欧美+亚洲+精品+三区| 亚洲欧美电影院| 日韩视频免费在线| 美女免费视频一区| 欧美一级视频| 亚洲网站在线播放| 亚洲精品乱码久久久久久黑人 | 亚洲综合欧美日韩| 亚洲黄色高清| 国产一区二区高清不卡| 欧美性猛片xxxx免费看久爱| 欧美成在线视频| 免费成人小视频| 女同一区二区| 亚洲精品三级| 亚洲三级色网| 亚洲高清在线观看一区| 韩日在线一区| 极品尤物久久久av免费看|