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

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的网站久久看| 最新国产の精品合集bt伙计| 欧美激情五月| 欧美日韩调教| 久久精品麻豆| 美女尤物久久精品| 一区二区三区成人 | 欧美在线视频导航| 久久久久99精品国产片| 亚洲精品美女久久久久| 亚洲午夜影视影院在线观看| 国产综合亚洲精品一区二| 亚洲国产精品专区久久| 欧美日韩精品免费观看视频| 欧美亚洲尤物久久| 另类欧美日韩国产在线| 亚洲婷婷国产精品电影人久久| 亚洲一区二区三区免费视频| 激情综合网激情| 一本久道久久综合中文字幕| 国产在线成人| 亚洲精品久久久蜜桃| 国产亚洲va综合人人澡精品| 亚洲国产精品成人va在线观看| 国产精品mm| 欧美国产精品一区| 国产日产精品一区二区三区四区的观看方式| 久久久中精品2020中文| 欧美日韩国产亚洲一区| 美女精品视频一区| 国产精品青草久久| 亚洲黄色尤物视频| 狠狠做深爱婷婷久久综合一区| 亚洲韩日在线| 激情久久影院| 亚洲欧美日韩电影| 一区二区三区不卡视频在线观看| 久久国内精品自在自线400部| 99re亚洲国产精品| 久久这里有精品15一区二区三区| 亚洲欧美视频在线观看视频| 欧美成人午夜视频| 欧美~级网站不卡| 国产日韩欧美综合| 亚洲一区二区精品在线观看| 国产精品99久久久久久www| 久久蜜桃精品| 久久久精品五月天| 国产热re99久久6国产精品| 一区二区三区精品| 一区二区三区四区精品| 欧美成人亚洲成人| 亚洲国产精品一区二区第一页 | 99在线精品免费视频九九视| 久久久人成影片一区二区三区观看| 亚洲欧美国产三级| 国产精品国色综合久久| 一区二区三区久久久| 一区二区三区日韩精品视频| 欧美高清视频| 日韩午夜三级在线| 亚洲欧美不卡| 国产精品久久久久久久一区探花| 99视频有精品| 午夜欧美大片免费观看 | 久久精品人人做人人爽电影蜜月 | 亚洲精品麻豆| 欧美国产三级| 亚洲精品一二| 亚洲一区二区视频| 国产精品免费视频观看| 亚洲男女毛片无遮挡| 欧美在线free| 亚洲电影免费在线观看| 欧美国产高清| 一区二区欧美在线| 欧美一级视频一区二区| 狠狠色狠狠色综合| 麻豆精品在线播放| 亚洲精品综合| 欧美夜福利tv在线| 亚洲成在线观看| 欧美日韩国产欧美日美国产精品| 日韩天堂av| 欧美中文字幕| 亚洲欧洲视频在线| 国产精品福利在线观看网址| 亚洲欧美成人网| 欧美风情在线| 亚洲欧美国产精品桃花| 尤物视频一区二区| 欧美日韩亚洲视频| 欧美在线网址| 亚洲美女精品成人在线视频| 欧美亚洲日本网站| 亚洲精品乱码久久久久| 国产精品美女视频网站| 久久这里只精品最新地址| 99re6这里只有精品| 久久理论片午夜琪琪电影网| 亚洲精品资源| 国产亚洲精品福利| 欧美日韩一区在线观看| 久久久久久69| 亚洲午夜激情免费视频| 欧美电影免费观看高清| 亚洲综合视频网| 亚洲精品美女久久久久| 国产一区二区三区久久久| 欧美精品成人一区二区在线观看 | 欧美片在线观看| 欧美一区午夜视频在线观看| 亚洲国产老妈| 久久一区亚洲| 欧美一区二区视频在线观看2020| 亚洲精品国产精品乱码不99按摩| 国产精品永久免费| 欧美人与禽猛交乱配| 麻豆国产精品va在线观看不卡| 亚洲一区二区三区精品在线| 亚洲精品一区二区三区在线观看| 六月天综合网| 久久国产精品一区二区三区| 一区二区三区成人| 亚洲免费电影在线| 1024日韩| 激情综合色综合久久| 国产三级欧美三级日产三级99| 欧美精品一区二区蜜臀亚洲| 免费美女久久99| 久久久久久婷| 久久久激情视频| 久久国产一区二区三区| 久久www成人_看片免费不卡| 香蕉精品999视频一区二区| 亚洲网站在线看| 一区二区三区成人精品| 亚洲乱码国产乱码精品精天堂 | 亚洲一级在线观看| 在线中文字幕一区| 亚洲视频中文字幕| 亚洲影院色无极综合| 一区二区三区成人| 亚洲永久免费观看| 欧美一区二区三区免费观看| 性欧美video另类hd性玩具| 亚洲免费综合| 久久国产精品一区二区| 久久精品视频亚洲| 久久一区二区三区四区五区| 老司机67194精品线观看| 另类激情亚洲| 欧美日韩日本视频| 国产精品尤物福利片在线观看| 国产精品自拍在线| 黑丝一区二区| 亚洲三级免费电影| 亚洲深夜影院| 久久成人久久爱| 美女视频黄a大片欧美| 亚洲国产导航| 亚洲一区二区三区久久| 久久国产天堂福利天堂| 免费看av成人| 国产精品国产| 精品二区视频| 亚洲私人影院| 久久久久久亚洲精品不卡4k岛国| 欧美好骚综合网| 亚洲深夜激情| 久久综合免费视频影院| 欧美日韩国产综合视频在线观看| 国产精品国产三级欧美二区| 国内精品久久久久久| 亚洲国产视频一区| 香蕉成人久久| 欧美激情一区在线观看| 亚洲香蕉伊综合在人在线视看| 欧美制服第一页| 欧美性视频网站| 在线观看亚洲视频| 亚洲欧美日韩精品久久| 欧美va亚洲va香蕉在线| 亚洲少妇最新在线视频| 麻豆成人小视频| 国产精品嫩草99av在线| 亚洲精品国产精品国自产观看浪潮| 亚洲欧美国产高清va在线播| 亚洲成色777777女色窝| 欧美日韩视频不卡| 国产曰批免费观看久久久| 一区二区三区高清视频在线观看 | 尤物yw午夜国产精品视频明星 | 国产一区自拍视频|