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

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热免费精品在线观看| 欧美性事在线| 亚洲人成在线观看网站高清| 亚洲欧美日本国产有色| 亚洲一区在线观看免费观看电影高清 | 亚洲精品少妇30p| 亚洲二区三区四区| 亚洲人精品午夜| 亚洲天堂av在线免费观看| 中日韩美女免费视频网站在线观看| 国产精品99久久99久久久二8| 亚洲欧美日本精品| 久久综合网hezyo| 亚洲高清视频在线| 亚洲美女淫视频| 先锋资源久久| 欧美多人爱爱视频网站| 欧美视频中文字幕在线| 国语自产精品视频在线看8查询8| 91久久久久久国产精品| 亚洲午夜精品国产| 久久视频一区二区| 日韩一级黄色片| 久久久综合激的五月天| 欧美三级电影大全| 狠狠色丁香久久综合频道| 一道本一区二区| 老司机久久99久久精品播放免费| 亚洲国产欧美在线人成| 亚洲欧美国产精品桃花| 欧美成人首页| 免费在线国产精品| 一本色道久久综合亚洲精品按摩| 久久99伊人| 欧美日韩一区二区在线观看| 永久域名在线精品| 午夜免费在线观看精品视频| 欧美国产成人在线| 欧美在线观看视频| 国产精品福利久久久| 亚洲人成在线播放| 久久久久久久欧美精品| 99热精品在线观看| 欧美.www| 一区二区三区在线视频免费观看| 亚洲综合成人在线| 亚洲免费观看在线观看| 免费亚洲电影在线| 韩国三级在线一区| 久久福利一区| 亚洲精品小视频在线观看| 久久五月激情| 精品不卡在线| 欧美在线视频免费播放| av不卡在线观看| 欧美日韩国产高清视频| 日韩视频在线永久播放| 亚洲高清一区二区三区| 久久亚洲精品中文字幕冲田杏梨| 国产人成一区二区三区影院| 午夜日韩在线| 亚洲欧美在线x视频| 国产精品男女猛烈高潮激情| 亚洲视频观看| 在线一区观看| 国产精一区二区三区| 午夜精品免费在线| 亚洲影院免费观看| 国产日韩精品久久| 久久久久国产一区二区三区| 欧美一级久久| 在线视频国产日韩| 亚洲区中文字幕| 欧美国产精品劲爆| 欧美大片在线观看一区| 亚洲精品视频在线看| 亚洲三级色网| 国产精品久在线观看| 性色av一区二区三区在线观看 | 国产精品高清一区二区三区| 亚洲香蕉伊综合在人在线视看| 亚洲精品久久久久中文字幕欢迎你| 欧美精品亚洲二区| 亚洲尤物影院| 欧美一进一出视频| 亚洲国产高清在线| 日韩视频一区二区三区在线播放| 国产精品高清一区二区三区| 久久精品在线免费观看| 免费在线亚洲欧美| 亚洲夜晚福利在线观看| 亚洲小视频在线观看| 女女同性女同一区二区三区91| 久久久久成人精品免费播放动漫| 伊人蜜桃色噜噜激情综合| 欧美国产日韩精品| 欧美视频网址| 亚洲精品国产日韩| 蜜桃av一区| 久久久久久久久伊人| 欧美日韩在线观看视频| 久久精品国产一区二区电影 | 美女视频网站黄色亚洲| 欧美精品一区二区在线观看 | 欧美黄色视屏| 欧美日产在线观看| 久久中文精品| 欧美性jizz18性欧美| 麻豆精品一区二区av白丝在线| 欧美日韩亚洲一区二区三区| 久久亚洲精选| 国产精品久久久999| 欧美国产亚洲精品久久久8v| 国产精品美女久久久久av超清 | 亚洲欧美日韩第一区| 亚洲欧洲精品一区| 亚洲欧美日韩电影| 亚洲网站啪啪| 另类天堂视频在线观看| 亚洲女同同性videoxma| 久久一区二区三区国产精品| 国产一区二区三区av电影| 亚洲免费观看高清完整版在线观看熊| 国产一区二区三区日韩欧美| 亚洲伦伦在线| 亚洲精品乱码久久久久久| 欧美一站二站| 性欧美激情精品| 国产精品夫妻自拍| 一本久道久久综合狠狠爱| 亚洲欧洲日本国产| 久久国产精品一区二区三区四区| 亚洲欧美成人| 欧美三区免费完整视频在线观看| 亚洲国产一区二区a毛片| 尤物九九久久国产精品的分类| 欧美亚洲免费在线| 欧美一区午夜视频在线观看| 欧美午夜精品久久久| 亚洲欧洲一二三| 亚洲巨乳在线| 欧美成人一区在线| 亚洲高清一区二区三区| 亚洲精品裸体| 欧美日韩成人在线视频| 亚洲日本中文| 亚洲影视九九影院在线观看| 欧美性猛交xxxx免费看久久久| 一区二区三区 在线观看视| 亚洲永久精品大片| 国产精品专区h在线观看| 欧美一区成人| 免费在线观看日韩欧美| 在线精品亚洲| 久久天堂国产精品| 亚洲二区视频在线| 日韩一级欧洲| 国产精品久久久免费| 99国产精品99久久久久久粉嫩| 噜噜噜91成人网| 午夜精品电影| 国产精品日韩欧美大师| 西西裸体人体做爰大胆久久久| 午夜视频在线观看一区二区三区 | 久久精品1区| 激情综合久久| 麻豆九一精品爱看视频在线观看免费| 亚洲成人在线免费| 美女诱惑黄网站一区| 亚洲国产一区二区三区a毛片 | 免费在线欧美视频| av成人动漫| 国产亚洲精品久久飘花| 久色婷婷小香蕉久久| 99精品久久久| 麻豆精品在线视频| 一区二区三区视频在线| 国产视频一区在线| 另类酷文…触手系列精品集v1小说| 亚洲美女av网站| 久久久久久穴| 一本大道久久a久久精品综合| 国产精品久久久久久影院8一贰佰| 欧美在线不卡| 亚洲人成高清| 久久久伊人欧美| 一区二区av| 雨宫琴音一区二区在线| 欧美午夜视频在线| 欧美福利一区| 久久精品一二三区| 在线亚洲欧美视频| 亚洲欧洲另类| 欧美大片一区二区| 久久久久高清| 亚洲午夜精品久久久久久app| 日韩亚洲精品视频| 亚洲国产精品成人一区二区 | 久久国产主播| 午夜视频在线观看一区二区|