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

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这里只有精品| 一区二区三区四区蜜桃| 国产精品久久久久三级| 亚洲免费在线| 久久国产精品网站| 影音先锋日韩有码| 亚洲国产精品一区二区第四页av| 欧美精品电影在线| 亚洲欧美清纯在线制服| 欧美一级视频精品观看| 亚洲国产精品电影在线观看| 亚洲激情网站| 国产精品一级| 欧美国产日本在线| 国产精品伦理| 玖玖玖国产精品| 欧美日韩一区在线| 久久婷婷国产综合尤物精品| 欧美精品一卡| 久久久久久久一区| 欧美激情视频一区二区三区在线播放| 这里只有精品丝袜| 久久成人精品无人区| 日韩一区二区免费高清| 中日韩美女免费视频网站在线观看| 国产精品美女主播在线观看纯欲| 乱码第一页成人| 国产精品国产三级欧美二区| 久久综合狠狠综合久久综青草| 欧美高清一区| 麻豆成人av| 国产精品美女久久久久aⅴ国产馆| 久久午夜色播影院免费高清| 欧美日韩久久精品| 久久在线播放| 国产欧美日韩一级| 亚洲乱码国产乱码精品精| 黑人一区二区三区四区五区| 亚洲少妇在线| 一本久道久久久| 久久野战av| 久久久久欧美| 国产老肥熟一区二区三区| 亚洲国产精品一区二区第四页av| 好吊一区二区三区| 欧美一区二区三区播放老司机| 亚洲小视频在线观看| 美女视频网站黄色亚洲| 久久亚洲不卡| 国产亚洲激情在线| 亚洲一区在线播放| 中文精品在线| 欧美日韩91| 欧美激情中文不卡| …久久精品99久久香蕉国产| 久久成人精品| 久久亚洲图片| 韩国av一区二区| 久久精品国产精品| 久久久久久久91| 国产在线观看精品一区二区三区 | 一区二区三区四区五区精品视频| 狂野欧美激情性xxxx欧美| 麻豆精品在线视频| 合欧美一区二区三区| 欧美资源在线| 蜜臀av在线播放一区二区三区| 国内激情久久| 久久久在线视频| 欧美韩日视频| 99ri日韩精品视频| 欧美视频在线一区二区三区| 亚洲午夜91| 久久精品一区二区三区中文字幕| 国产日韩欧美一区二区| 久久9热精品视频| 巨乳诱惑日韩免费av| 最新中文字幕一区二区三区| 欧美成人中文字幕| 日韩午夜av电影| 午夜精品久久久久久久蜜桃app| 国产精品亚洲综合一区在线观看 | 中文国产亚洲喷潮| 久久国内精品视频| 在线看欧美视频| 欧美成人中文字幕| 亚洲女与黑人做爰| 免费人成网站在线观看欧美高清| 亚洲国产成人在线播放| 欧美日韩一区二区视频在线观看| 亚洲一区二区三区高清不卡| 久久一区二区三区国产精品| 亚洲另类一区二区| 国产精品入口麻豆原神| 久久嫩草精品久久久久| 一区二区不卡在线视频 午夜欧美不卡在| 午夜精品久久久久久久白皮肤 | 亚洲第一精品夜夜躁人人躁| 欧美国产一区二区在线观看| 亚洲一区尤物| 亚洲盗摄视频| 欧美一区二视频| 亚洲人成网在线播放| 国产精品免费在线 | 欧美一区2区视频在线观看| 欧美大胆成人| 欧美在线免费观看| 亚洲精品影院| 狠久久av成人天堂| 欧美手机在线视频| 欧美国产日韩免费| 欧美在线日韩| 亚洲私人影院在线观看| 亚洲国产高清自拍| 久久香蕉国产线看观看网| 亚洲无玛一区| 亚洲精一区二区三区| 很黄很黄激情成人| 国产日产欧美一区| 欧美日韩综合一区| 欧美精品尤物在线| 欧美高清视频一区| 美女国产一区| 久久免费国产| 久久久精品999| 欧美一区二区三区在线| 亚洲一区二区视频在线观看| aa国产精品| 亚洲精品一区久久久久久| 欧美国产高清| 亚洲二区免费| 欧美福利在线观看| 欧美成人精品一区二区| 久久综合狠狠综合久久综合88| 久久成人一区| 欧美在线短视频| 欧美一级黄色录像| 久久av最新网址| 久久国产精品黑丝| 久久国内精品视频| 久久久xxx| 久久在线91| 欧美成人福利视频| 欧美激情片在线观看| 欧美高清视频在线播放| 亚洲电影视频在线| 亚洲日本一区二区三区| 99亚洲视频| 亚洲一区二区少妇| 欧美在线观看一区二区| 久久精品国产99| 噜噜噜噜噜久久久久久91| 欧美xx视频| 欧美视频不卡| 国产模特精品视频久久久久 | 国产欧美日韩一区二区三区| 国产欧美一区二区色老头| 国产亚洲制服色| 最新日韩av| 中日韩美女免费视频网址在线观看| 国产精品99久久不卡二区| 午夜精品区一区二区三| 久久精品亚洲| 亚洲丰满在线| 正在播放欧美一区| 久久精品视频在线免费观看| 久久综合影视| 国产精品成人在线| 国产尤物精品| 99精品热6080yy久久| 亚洲欧美国产精品桃花| 久久亚洲精品中文字幕冲田杏梨| 欧美黄色视屏| 亚洲一区二区在线免费观看视频| 久久久99精品免费观看不卡| 欧美激情一区在线观看| 国产欧美视频一区二区三区| 在线观看日韩av先锋影音电影院| 中日韩高清电影网| 农夫在线精品视频免费观看| 一区二区三区欧美激情| 欧美中日韩免费视频| 欧美日韩国产片| 亚洲二区在线| 性8sex亚洲区入口| 亚洲三级视频在线观看| 新67194成人永久网站| 欧美精品在线观看91| 黄色av成人| 欧美专区在线播放| 亚洲精品日韩久久| 欧美/亚洲一区| 激情婷婷久久| 欧美一区二区久久久| 夜夜爽av福利精品导航| 久久嫩草精品久久久精品|