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

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>
            国产精品女主播| 国产日韩av高清| 亚洲国产日韩精品| 欧美1区2区3区| 蜜桃久久av| aa成人免费视频| 亚洲午夜黄色| 国产一区在线观看视频| 欧美aaaaaaaa牛牛影院| 免费看亚洲片| 亚洲小视频在线| 性欧美xxxx大乳国产app| 韩国三级在线一区| 亚洲欧洲另类| 国产精品高潮在线| 另类图片综合电影| 欧美激情一区二区三区在线视频观看| 99热在线精品观看| 亚洲欧美在线一区| 亚洲区中文字幕| 亚洲影院在线| 亚洲黄色一区二区三区| 日韩亚洲精品在线| 国产一区二区中文字幕免费看| 欧美大胆成人| 国产精品老女人精品视频| 久久综合久久综合九色| 欧美日韩国产综合一区二区| 欧美一区二区三区四区在线| 欧美成人精品高清在线播放| 亚洲欧美在线x视频| 免费成年人欧美视频| 亚洲欧美视频在线观看| 嫩草影视亚洲| 久久九九电影| 国产精品久久久久久久久果冻传媒 | 亚洲另类视频| 狠狠色狠狠色综合日日小说 | 亚洲欧美日韩中文播放| 免费久久精品视频| 久久精品毛片| 欧美午夜精品久久久久免费视| 鲁鲁狠狠狠7777一区二区| 国产精品成人免费精品自在线观看| 乱人伦精品视频在线观看| 国产精品视频午夜| 亚洲美女中出| 99av国产精品欲麻豆| 久久尤物电影视频在线观看| 久久国产精品亚洲77777| 欧美日韩在线播放一区| 亚洲高清网站| 亚洲国产日韩欧美| 久久久久综合| 老**午夜毛片一区二区三区| 国产毛片一区| 亚洲一区图片| 午夜久久一区| 国产精品无码专区在线观看| 99国产精品久久久| 亚洲图片在线| 欧美体内she精视频在线观看| 亚洲欧洲三级| 一区二区三区.www| 欧美日韩一二三区| 日韩视频在线一区二区| 国产精品99久久久久久久久| 欧美三区美女| 亚洲欧美不卡| 久久蜜桃香蕉精品一区二区三区| 国产亚洲精品激情久久| 欧美专区第一页| 巨胸喷奶水www久久久免费动漫| 黄色亚洲免费| 另类专区欧美制服同性| 欧美高清视频一区二区| 亚洲精品麻豆| 欧美三级特黄| 亚洲欧美日韩国产一区| 久久免费精品日本久久中文字幕| 国产午夜精品视频免费不卡69堂| 欧美一区二区高清在线观看| 久久亚洲风情| 亚洲日本精品国产第一区| 欧美精品一区二区三区在线播放| 亚洲毛片av| 久久成人资源| 最近中文字幕日韩精品| 欧美日韩中文在线| 午夜精品成人在线| 欧美www视频在线观看| 99国产精品久久| 国产精品乱码人人做人人爱| 欧美一区激情| 亚洲国产精品悠悠久久琪琪| 亚洲欧美精品一区| 精品动漫一区| 欧美日韩三区| 久久久精品一区二区三区| 亚洲激情成人| 久久精品免费电影| 99re6热在线精品视频播放速度| 国产精品视频久久久| 久久免费高清视频| 亚洲图片欧美日产| 欧美成人dvd在线视频| 亚洲女爱视频在线| 亚洲娇小video精品| 国产精品少妇自拍| 欧美成人高清视频| 欧美一级艳片视频免费观看| 亚洲精品久久久久久久久久久| 欧美在线视屏| 亚洲线精品一区二区三区八戒| 激情六月婷婷综合| 国产精品日韩精品欧美精品| 欧美大色视频| 久久久999精品免费| 亚洲一区二区三区在线看| 亚洲国产高清在线观看视频| 欧美在线免费观看| 亚洲影视九九影院在线观看| 亚洲激情成人在线| 国内揄拍国内精品久久| 国产精品久久久久久久免费软件 | 亚洲高清视频在线观看| 国产精品日产欧美久久久久| 欧美久色视频| 欧美高清免费| 久久综合色8888| 久久久亚洲高清| 欧美在线国产| 欧美一区二区三区视频在线| 亚洲一区二区三区免费在线观看| 亚洲精品在线观| 亚洲国产精品www| 欧美激情欧美激情在线五月| 美日韩免费视频| 另类人畜视频在线| 老司机成人网| 免费人成精品欧美精品| 麻豆国产精品一区二区三区| 久久久久.com| 久久夜色精品国产欧美乱| 久久xxxx| 麻豆免费精品视频| 欧美69wwwcom| 欧美激情一二三区| 亚洲国产日韩欧美在线动漫| 欧美岛国激情| 亚洲欧洲一区二区三区在线观看| 91久久精品日日躁夜夜躁国产| 亚洲人成久久| 在线亚洲一区二区| 亚洲欧美一区二区三区久久| 羞羞色国产精品| 久久国产一区二区| 欧美1区视频| 欧美日韩免费视频| 国产精品人人做人人爽| 国产一区二区三区高清| 影音先锋一区| 99精品视频免费| 欧美一区二区三区日韩| 久久久国产精品亚洲一区 | 亚洲男女自偷自拍图片另类| 亚洲欧美伊人| 理论片一区二区在线| 亚洲激情在线播放| 亚洲一区三区电影在线观看| 久久黄金**| 欧美日韩播放| 国产婷婷97碰碰久久人人蜜臀| 在线日本成人| 一区二区三区视频观看| 欧美综合国产精品久久丁香| 欧美激情中文字幕一区二区| 一区二区不卡在线视频 午夜欧美不卡在 | 亚洲第一精品福利| 亚洲一区二区三区视频播放| 久久精品日产第一区二区| 免费看av成人| 亚洲一区二区三区视频| 久久这里只精品最新地址| 欧美午夜免费影院| 精品福利电影| 亚洲综合另类| 亚洲国产99| 欧美一区二区日韩一区二区| 欧美激情一区二区三区在线视频观看| 国产精品一区视频网站| 亚洲人成人77777线观看| 欧美一区二区三区精品电影| 亚洲大片一区二区三区| 性色av一区二区怡红| 欧美视频在线一区| 亚洲欧洲精品一区二区三区| 久久精品国产久精国产爱| 日韩一区二区精品视频| 美女黄毛**国产精品啪啪|