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

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
    支持!

    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>
            欧美另类专区| 国产精品vvv| 欧美精品激情在线观看| 国产婷婷色一区二区三区在线| 亚洲精品裸体| 欧美成人a视频| 久久久久国产精品一区| 国产日韩欧美综合| 欧美一区二区黄| 在线视频中文亚洲| 国产精品第一区| 午夜欧美电影在线观看| 亚洲视频香蕉人妖| 国产精品入口尤物| 欧美在线视频免费播放| 亚洲欧美成人| 国内精品久久久久影院 日本资源| 欧美一区二区三区视频免费播放| 亚洲欧美国产精品专区久久| 国产乱人伦精品一区二区| 欧美伊人精品成人久久综合97| 亚洲免费视频网站| 国内精品**久久毛片app| 老司机精品视频网站| 欧美成人免费小视频| 一本色道久久综合亚洲精品不卡 | 久久久噜噜噜久噜久久| 亚洲欧美日韩精品久久| 国产精品久久久久久久久久尿 | 黄色一区二区在线| 久久先锋资源| 欧美黑人在线观看| 亚洲在线观看| 欧美综合二区| 亚洲精品久久久久久久久久久久久 | 一个人看的www久久| 亚洲午夜精品一区二区三区他趣| 国产欧美一区二区精品秋霞影院| 久久在线观看视频| 欧美激情一区在线| 午夜在线a亚洲v天堂网2018| 欧美一区国产二区| 99国产精品久久| 午夜国产一区| 亚洲靠逼com| 一本到12不卡视频在线dvd| 亚洲综合国产| 亚洲精品美女在线观看| 亚洲一线二线三线久久久| 伊人久久婷婷| 亚洲一二三区在线| 最新亚洲一区| 午夜精品区一区二区三| 亚洲精品资源| 久久精品99国产精品日本| 亚洲私人影院在线观看| 浪潮色综合久久天堂| 欧美一区二区视频观看视频| 欧美国产国产综合| 久久精选视频| 欧美网站大全在线观看| 欧美激情精品久久久久久| 国产欧美日韩伦理| 一区二区三区久久久| 亚洲激情视频网站| 午夜一区二区三区不卡视频| 亚洲少妇自拍| 欧美国产精品v| 免费观看在线综合| 国产自产精品| 欧美亚洲专区| 午夜精品久久久久久99热| 欧美国产一区二区在线观看| 久久久久久电影| 国产精品美女999| 亚洲最新中文字幕| 99成人精品| 欧美日本在线播放| 亚洲国产日韩欧美在线99 | 蜜桃久久精品乱码一区二区| 国产精品久久久久久久7电影 | 欧美激情一区二区三级高清视频| 久久美女性网| 国内揄拍国内精品久久| 性做久久久久久久久| 性欧美精品高清| 国产精品拍天天在线| 一区二区三区日韩| 亚洲在线免费| 国产麻豆午夜三级精品| 亚洲永久字幕| 久久国产一二区| 国产亚洲精品激情久久| 香蕉久久夜色精品国产| 久久久精品日韩欧美| 国产一区欧美日韩| 久久久久久久久伊人| 欧美成人69| 亚洲精选一区| 欧美日韩亚洲国产精品| 亚洲网站视频福利| 欧美一区二区三区四区视频| 国产精品影视天天线| 欧美影片第一页| 美日韩免费视频| 91久久午夜| 欧美日韩亚洲综合一区| 一个色综合av| 欧美在线亚洲综合一区| 国产亚洲一区二区三区| 亚洲福利免费| 99精品视频免费观看| 国产精品久久久久影院色老大 | 亚洲精品乱码久久久久久蜜桃91| 亚洲精品偷拍| 国产精品久久久久aaaa樱花| 久久动漫亚洲| 亚洲高清久久久| 亚洲一区二区影院| 国产一区自拍视频| 免费不卡在线视频| 夜夜嗨av一区二区三区网页| 久久国产视频网站| 日韩视频中午一区| 国产欧美日韩不卡免费| 欧美成人蜜桃| 午夜老司机精品| 亚洲福利av| 久久九九热免费视频| 亚洲另类自拍| 国产一区二区主播在线| 欧美激情综合在线| 欧美一区二区视频在线| 亚洲日韩成人| 老司机凹凸av亚洲导航| 亚洲一二区在线| 在线日韩中文| 国产精品综合不卡av| 欧美大片91| 久久精品亚洲乱码伦伦中文 | 欧美精品三区| 久久精品人人做人人综合| 一本大道久久a久久综合婷婷| 久久久免费精品视频| 亚洲尤物视频网| 99精品久久| 亚洲国产婷婷香蕉久久久久久| 国产免费观看久久| 欧美日韩一区二区三区| 老**午夜毛片一区二区三区| 午夜精品久久久久久久久久久久久| 亚洲国产日韩欧美| 欧美1区免费| 久久影视精品| 久久国内精品视频| 亚洲欧美日韩另类精品一区二区三区| 在线视频国产日韩| 激情一区二区三区| 国产婷婷97碰碰久久人人蜜臀| 欧美日韩免费在线观看| 欧美国产成人在线| 可以免费看不卡的av网站| 欧美在线视频不卡| 性欧美长视频| 亚洲欧美日韩国产综合在线| 亚洲一区二区黄| 中文国产成人精品久久一| 亚洲国产乱码最新视频| 欧美va亚洲va香蕉在线| 免费一区二区三区| 欧美成熟视频| 欧美激情亚洲| 亚洲大片一区二区三区| 欧美福利影院| 亚洲国产精品久久人人爱蜜臀| 免费成人在线视频网站| 裸体歌舞表演一区二区| 麻豆九一精品爱看视频在线观看免费| 久久国产一区| 免费一级欧美在线大片| 亚洲第一黄色网| 亚洲精品久久久久中文字幕欢迎你| 欧美日韩国产页| 欧美精品一区二区三区久久久竹菊| 欧美成人嫩草网站| 欧美日韩1080p| 国产精品www色诱视频| 国产精品日韩久久久久| 国产日韩在线视频| 激情丁香综合| 日韩午夜激情| 亚洲尤物精选| 久久久亚洲午夜电影| 欧美大秀在线观看| 亚洲国产精品一区二区久| 亚洲精品久久久久久下一站| 亚洲私人影吧| 久久国内精品视频| 欧美成人久久| 国产精品区一区|