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

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  回復(fù)  更多評論   

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

    只有注冊用戶登錄后才能發(fā)表評論。
    網(wǎng)站導(dǎo)航: 博客園   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>
            亚洲欧美制服另类日韩| 亚洲成人影音| 亚洲欧美精品suv| 亚洲视频成人| 国产日韩欧美三级| 久久影视精品| 欧美成人精品一区二区三区| 一区二区三区蜜桃网| 一区二区三区四区国产| 国产真实乱子伦精品视频| 玖玖玖免费嫩草在线影院一区| 米奇777超碰欧美日韩亚洲| 国产精品99久久久久久久久久久久| 亚洲影院色在线观看免费| 黄色成人在线观看| 亚洲精品美女| 国产日本欧美在线观看| 欧美国产专区| 国产精品乱码妇女bbbb| 另类人畜视频在线| 欧美无乱码久久久免费午夜一区| 欧美一区二区女人| 欧美精品久久久久久久久久| 香蕉av777xxx色综合一区| 欧美 日韩 国产一区二区在线视频| 亚洲天天影视| 美女网站久久| 久久都是精品| 欧美日韩一区二区三区在线观看免 | 欧美一区二区三区四区夜夜大片 | 夜夜嗨av色一区二区不卡| 亚洲欧美日韩在线观看a三区| 亚洲电影第三页| 亚洲影院在线观看| 在线一区二区三区四区五区| 久久精品国产一区二区三| 亚洲永久字幕| 欧美激情视频一区二区三区在线播放| 午夜精品av| 欧美欧美全黄| 欧美成人自拍| 激情综合在线| 欧美亚洲一区二区三区| 亚洲午夜精品国产| 欧美精品一区二区在线播放| 欧美不卡视频| 韩日精品视频一区| 亚洲欧美日韩直播| 亚洲男女自偷自拍图片另类| 欧美精品xxxxbbbb| 亚洲经典在线| 亚洲精品中文字| 猛干欧美女孩| 欧美国产视频日韩| 在线精品视频免费观看| 久久天天躁狠狠躁夜夜av| 久久久国产精品一区二区中文| 国产精品久久久一区二区三区| 国产亚洲人成a一在线v站| 亚洲视频在线看| 午夜精品在线| 国产日韩一区欧美| 午夜精品影院在线观看| 久久精品二区| 精品成人一区二区三区四区| 久久久国产91| 欧美韩日精品| 一本到高清视频免费精品| 欧美另类极品videosbest最新版本| 亚洲国产午夜| 亚洲视屏在线播放| 国产精品欧美经典| 亚洲欧美综合v| 麻豆精品视频在线观看| 亚洲欧洲日产国产综合网| 欧美大学生性色视频| 亚洲精品无人区| 亚洲一区制服诱惑| 国产欧美日韩亚洲一区二区三区| 欧美一区免费视频| 亚洲福利视频三区| 亚洲色图自拍| 国产主播精品在线| 欧美激情aⅴ一区二区三区| 亚洲三级免费| 午夜一区二区三区在线观看| 国内伊人久久久久久网站视频 | 欧美亚洲日本一区| 国产精品嫩草99a| 欧美一区二区三区在线看| 毛片精品免费在线观看| 一区二区黄色| 国内精品视频一区| 欧美久久久久久蜜桃| 亚洲欧美日韩国产综合| 欧美国产日韩精品免费观看| 中文在线一区| 精品成人久久| 国产精品美女久久久久久2018| 久久成人精品| 亚洲美女在线一区| 噜噜噜91成人网| 亚洲欧美国产三级| 亚洲国产精品一区二区久| 国产精品高清网站| 美日韩免费视频| 欧美一区二区三区另类| 亚洲美女视频网| 欧美不卡福利| 欧美在线观看一区| 一本色道久久88亚洲综合88| 狠狠干狠狠久久| 国产精品自在线| 欧美国产日韩一区二区| 欧美在线视频在线播放完整版免费观看| 亚洲电影毛片| 久久夜色精品国产欧美乱极品| 亚洲宅男天堂在线观看无病毒| 伊人久久大香线蕉综合热线| 国产精品毛片在线| 欧美久久成人| 浪潮色综合久久天堂| 午夜精品电影| 亚洲专区免费| 亚洲视频欧美视频| 亚洲美女福利视频网站| 亚洲电影天堂av| 蜜桃伊人久久| 狂野欧美激情性xxxx| 欧美一二三区在线观看| 亚洲综合丁香| 亚洲欧美韩国| 亚洲欧美国产精品桃花| 亚洲午夜女主播在线直播| 99视频在线观看一区三区| 亚洲人线精品午夜| 亚洲第一二三四五区| 精品999久久久| 韩国v欧美v日本v亚洲v| 韩日欧美一区二区| 狠狠色香婷婷久久亚洲精品| 禁断一区二区三区在线| 黄色精品在线看| 亚洲国产91| 亚洲国产老妈| 午夜综合激情| 久久精品国产清高在天天线| 久久久亚洲欧洲日产国码αv| 久久久免费精品视频| 久久天天躁夜夜躁狠狠躁2022| 老司机精品导航| 欧美激情视频网站| 欧美三区美女| 国产精品亚发布| 国内成+人亚洲| 亚洲国产精品一区二区第一页 | 99国产麻豆精品| 在线亚洲欧美| 欧美在线视频一区二区| 免播放器亚洲| 欧美日韩一区二区三区高清| 国产精品网站一区| 在线观看国产日韩| 日韩一区二区精品| 午夜亚洲视频| 欧美岛国在线观看| 一本色道久久综合| 欧美亚洲一区二区三区| 奶水喷射视频一区| 国产精品v欧美精品v日韩 | 国产日韩精品一区二区浪潮av| 99re8这里有精品热视频免费 | 亚洲一区二区三区777| 欧美在线高清| 欧美日本在线播放| 韩国欧美国产1区| 一区二区三区高清视频在线观看| 欧美一级视频精品观看| 亚洲国产经典视频| 亚洲免费视频成人| 欧美大片在线观看一区二区| 国产精品久久久久久久久久ktv | 国产欧美日韩视频在线观看 | 欧美一区网站| 亚洲国内精品| 欧美专区在线观看| 欧美日韩免费高清| 亚洲国产免费| 久久动漫亚洲| 一区二区三区不卡视频在线观看| 久久精品99国产精品酒店日本| 欧美日韩精品一区二区三区| 在线观看日韩av电影| 欧美一区二区三区四区在线观看| 亚洲国产精品久久久久| 久久久999精品视频| 国产麻豆综合| 亚洲欧美激情四射在线日| 亚洲国产精品久久精品怡红院| 久久不见久久见免费视频1|