×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    48

    Question Queue data structure in Symbian ???

    Hi all,

    This a basic question, but I need help. I want a queue like data structure for my program? Is there any?

    My use case is this : I insert file names to data structure in one code (say AO). The other AO must dequeue the first element and process it. Dequeue in sense that file name won't further be in the datastructure. So that the second element become first after dequeue and process the first element.

    I went through the CDesCArrayFlat array. Is it behave same as arrays in Java. I am not clear on following points.

    In what order element get inserted if use CDesCArrayFlat::AppendL(filename). Is that strictly insertion order?
    If I delete element at 0th or i th index, will 1st or (i+1)th element shift automatically to the 0th 0r i th posistion respectively?

    I know these are basic. I have no much experience with Symbian.

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    48

    Re: Queue data structure in Symbian ???

    TSglQue would be the answer for Queue :-). But I need help for CDesCArrayFlat questions

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Queue data structure in Symbian ???

    AppendL add new item into the end of the array, and yes, deleting items will shift the ones after that one to have smaller index.

  4. #4
    Registered User
    Join Date
    May 2009
    Posts
    48

    Re: Queue data structure in Symbian ???

    For my use case what would be do better TSglQue or CDesCArrayFlat ?
    Does TSglQue Remove behave like that?

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Queue data structure in Symbian ???

    I never used TSglQue, so don't really know what benefits it might provide. Anyway CDesCArrayFlat is easy to use, and if it suits your use case, you might want to just try it out then.

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: Queue data structure in Symbian ???

    TSglQue is about creating a linked list, CDesCArrayFlat is about creating a flat array of descriptors.
    Technically your use case could benefit from having a linked list, since you do not need random access (where a flat array would excel), and you want to delete a lot (always?) from the beginning of your list.
    Read about arrays and linked lists in some book/material dealing with algorithms and generic programming questions. Wikipedia may also help.

Similar Threads

  1. how to use queue to pass the data
    By prathi in forum Symbian
    Replies: 1
    Last Post: 2010-06-10, 14:38
  2. Replies: 0
    Last Post: 2010-06-05, 10:03
  3. List Data structure...
    By deepchand86 in forum Symbian
    Replies: 1
    Last Post: 2008-08-19, 06:07
  4. Data structure for screen switching
    By soku123 in forum Mobile Java General
    Replies: 3
    Last Post: 2007-10-11, 04:25
  5. queue in symbian
    By ram4soft in forum Symbian
    Replies: 3
    Last Post: 2007-07-17, 11:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×