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

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>
            激情亚洲网站| 久久精品噜噜噜成人av农村| 欧美激情一区二区三区成人| 亚洲一级网站| 麻豆亚洲精品| 国产精品一区二区黑丝| 亚洲国产精品第一区二区三区| 欧美日韩美女一区二区| 亚洲黄色在线| 日韩视频在线观看国产| 久久在线免费观看| 亚洲第一主播视频| 欧美专区在线播放| 性欧美大战久久久久久久免费观看| 欧美激情亚洲另类| 亚洲国产精品va| 日韩一二三区视频| 欧美日韩八区| 亚洲伦伦在线| av成人老司机| 欧美亚洲成人免费| 午夜一区二区三视频在线观看| 午夜在线电影亚洲一区| 国产乱码精品一区二区三区五月婷| 亚洲一区二区日本| 亚洲欧美日韩国产另类专区| 国产欧美日韩综合一区在线播放 | 欧美国产第一页| 久久在线精品| 亚洲国产精品va在线看黑人 | 99国内精品久久| 欧美日韩精品免费观看视一区二区| 夜夜夜久久久| 久久夜色精品| 影音先锋亚洲视频| 欧美 日韩 国产精品免费观看| 亚洲国产一区视频| 亚洲欧美日韩另类| 在线观看日韩国产| 欧美视频一区二| 新67194成人永久网站| 欧美激情精品久久久久久变态| 99视频国产精品免费观看| 国产精品视频1区| 老司机午夜精品| 91久久中文| 欧美午夜宅男影院| 午夜综合激情| 日韩视频永久免费| 快射av在线播放一区| 一区二区免费看| 黄色成人91| 国产精品草莓在线免费观看| 久久综合色综合88| 亚洲综合不卡| 亚洲国产精品一区二区第四页av| 欧美一区2区三区4区公司二百| 亚洲人体影院| 好男人免费精品视频| 久久久久久91香蕉国产| 亚洲麻豆av| 亚洲成人在线视频播放 | 亚洲欧美另类在线观看| 日韩视频免费观看高清完整版| 久久国产免费看| 亚洲午夜在线观看| 1000部精品久久久久久久久| 欧美三区在线| 欧美阿v一级看视频| 亚洲自拍16p| 日韩性生活视频| 亚洲电影免费观看高清完整版| 久久久国产精品亚洲一区 | 欧美一区二区三区另类| 亚洲少妇在线| 亚洲精品一区二区三区蜜桃久| 国产一区自拍视频| 国产精品一二三四区| 国产精品乱码久久久久久| 欧美日韩一区在线观看视频| 欧美激情二区三区| 欧美日韩国产片| 欧美三区在线| 国产精品久久久爽爽爽麻豆色哟哟| 欧美一区观看| 久久久久久久久久久一区| 久久精品国产清高在天天线| 亚洲一区二区三区成人在线视频精品 | 欧美成人国产| 另类天堂av| 欧美激情一区二区三区在线视频观看| 你懂的国产精品| 老司机精品视频网站| 免费在线观看一区二区| 欧美成人日本| 欧美日韩在线免费| 国产精品婷婷午夜在线观看| 国产精品无码专区在线观看| 国产一区二区久久精品| 激情国产一区二区| 国产欧美日韩视频一区二区三区| 国产一区二区在线免费观看| 在线看不卡av| 99精品国产高清一区二区| 午夜欧美大尺度福利影院在线看| 新67194成人永久网站| 一区二区三区四区五区视频| 亚洲一区视频| 久久夜色撩人精品| 欧美激情1区2区| 一本色道久久88精品综合| 午夜精品久久99蜜桃的功能介绍| 这里只有精品视频| 久久久久久综合网天天| 欧美日韩在线精品| 国产综合欧美| 亚洲视频在线免费观看| 久久久久久久综合| 美女尤物久久精品| 亚洲天天影视| 欧美成人自拍视频| 国产欧美亚洲一区| 亚洲国产你懂的| 午夜综合激情| 久久日韩精品| 亚洲麻豆一区| 午夜日韩电影| 欧美日韩成人在线播放| 韩国av一区| 亚洲欧美日韩直播| 亚洲国产日韩欧美| 亚洲男女自偷自拍图片另类| 久久久国产成人精品| 国产精品国产精品国产专区不蜜| 亚洲电影在线观看| 久久国产精品99国产精| 亚洲大片在线观看| 久久久国产精品一区| 国产精品久久网站| 亚洲精品美女| 亚洲电影免费在线| 久久人人看视频| 国产一区久久| 亚洲伊人网站| 一区二区三区国产在线| 男同欧美伦乱| 在线观看国产欧美| 久久久国产精品一区| 亚洲女性裸体视频| 国产精品美女久久久免费| av不卡在线观看| 性欧美xxxx视频在线观看| 在线视频精品一区| 欧美激情一区二区在线| 亚洲国产综合视频在线观看| 麻豆成人在线观看| 欧美在线亚洲一区| 国产色产综合色产在线视频| 销魂美女一区二区三区视频在线| 夜夜嗨av色一区二区不卡| 欧美精品一区二区三区蜜臀| 亚洲国产日韩欧美在线图片| 久久gogo国模裸体人体| 国产精品99久久久久久久vr| 欧美人交a欧美精品| 日韩一级免费观看| 91久久精品国产| 久久一区二区三区国产精品| 亚洲国产天堂网精品网站| 欧美成人性生活| 欧美大片免费观看在线观看网站推荐| 精品成人久久| 亚洲区中文字幕| 欧美午夜在线| 久久国内精品视频| 久久亚洲春色中文字幕久久久| 欲色影视综合吧| 亚洲激情在线| 久久综合给合久久狠狠狠97色69| 极品中文字幕一区| 欧美成人免费网站| 欧美日韩国产黄| 久久精品1区| 久久久久欧美精品| 日韩一级大片在线| 久久国产精品亚洲va麻豆| 亚洲人成绝费网站色www| 午夜精品久久久久99热蜜桃导演| 亚洲级视频在线观看免费1级| 午夜精品视频一区| 这里只有精品视频| 欧美成人免费大片| 米奇777在线欧美播放| 国产精品免费看久久久香蕉| 亚洲欧洲日韩在线| 亚洲日韩成人| 欧美一区综合| 久久精品在线| 国产亚洲精品v| 午夜精品久久久久99热蜜桃导演|