Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: mop65715

Page 1 of 16 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    1
    Views
    461

    endian and proxy representation

    Given:
    A [0..4] - where 0..4 represents a bit proxy 4 wide
    B [5..8] - where 5..8 represents a bit proxy 4 wide
    C [9..12] - where 9..12 represents a bit proxy 4 wide
    D [13..16] - where 13..16...
  2. Replies
    6
    Views
    780

    Re: global constants - two alternatives...

    My concern goes beyond 'unused symbols'. I'm trying to make sense of a coding standard that suggests using the 'global_constants1' option.
  3. Replies
    6
    Views
    780

    global constants - two alternatives...

    Given:



    # include <iostream>

    //In a file called ... global_constants.h
    class global_constants1
    {
    public :
  4. Replies
    16
    Views
    1,153

    Re: static factory...

    The overhead is the big difference for the event driven case (There's zero overhead for the global repository). You'll end up with Pnhandlers notifying DnHandlers of a PnMessage every 40ms. ...
  5. Replies
    16
    Views
    1,153

    Re: static factory...

    Partially... See attached.
  6. Replies
    16
    Views
    1,153

    Re: static factory...

    Really, isn't that I've said from the outset. This has become silly, so in an attempt to keep the SNR down...move on.
  7. Replies
    16
    Views
    1,153

    Re: static factory...

    Again - from my perspective a Dn handler does not need a notification when a Pn message is updated by a Pn handler. A Dn handler's process method is invoked after 'Reads' of Aircraft (A/C) data. ...
  8. Replies
    16
    Views
    1,153

    Re: static factory...

    [QUOTE=potatoCode;1915161]Hi mop65715

    With all the respect, I recommend that you follow kempofighter's suggestion.


    QUOTE]
    I did and came up with a revised implementation. I still have a...
  9. Replies
    16
    Views
    1,153

    Re: static factory...

    For starters, the pure virtual 'Serialize' function in the Base class is contrived. An alternate name might have eliminated the confusion. That said,...... consider this. Lets assume you and I are...
  10. Replies
    16
    Views
    1,153

    Re: static factory...

    OK! Let me rethink this.

    Here's another question: Assume the messages were singleton.

    Given:


    D1* ptr2 = static_cast< D1* > ( simple.GetInstance ( 1 ) );

    This results in a call to:
  11. Replies
    16
    Views
    1,153

    static factory...

    Given:




    #include <map>
    #include <memory>
    #include <exception>
    #include <vector>
    #include <iostream>
  12. Replies
    0
    Views
    711

    Generic message factory or ...

    Consider the pseudo code.




    class Base_Msg {
    public:
    // stuff
    virtual ~Base_Msg() {}
    };
  13. Replies
    7
    Views
    616

    Re: delete doesn't appear to delete

    Could you elaborate on the part starting with 'I'd think ... .ClassType'. Not sure if I follow you...
  14. Replies
    7
    Views
    616

    Re: delete doesn't appear to delete

    superbonzo and Lindley(as always) thanks. On a separate note: Consider this line



    //I think static_cast here should suffice
    return static_cast< ClassType& >( *( key_list [ key ] ) );
    ...
  15. Replies
    7
    Views
    616

    delete doesn't appear to delete

    The singleton class based off the CRTP is not provided, nonetheless consider.



    # include <iostream>
    # include <map>
    # include <string>
    # include <vector>

    class Base {
  16. Replies
    1
    Views
    2,839

    #include question

    For starters I'm using Visual C++ 2008 Express Edition.

    That aside, I have a visual studio solution test_project within a directory called test_project. IOW my directory structure is akin to:
    ...
  17. Replies
    4
    Views
    1,666

    Re: Convert vector to vector?

    See attached for an approach that provides a byte-order-agnostic internal buffer, which just stores a current value as an array of bytes. The class also provides an interface for setting/getting...
  18. Replies
    3
    Views
    491

    efficient way to copy composite types

    I'm perusing code that is structured around - presumably a bridge design. There's performance concerns surround the store functions that store composite types which contains POD types. So consider:...
  19. Replies
    0
    Views
    378

    binary input and output stream

    I'm trying to put together a class or (suite of classes) that'll support reads and writes in binary form into an input and output stream respectively. The class will also support automatic...
  20. Replies
    1
    Views
    563

    template parameter representation

    Consider the source snippet




    typedef hw_default < volatile unsigned short > hw_default_type;

    typedef hw_register_struct < volatile unsigned short,
    ...
  21. Replies
    2
    Views
    585

    Re: template instantiation question

    For starters, thanks Paul. Two questions:
    a) Can you show me a context where it does matter?
    b) On an slightly unrelated note. Consider the case where the layout defined in a requirements...
  22. Replies
    2
    Views
    585

    template instantiation question

    Consider



    # include <iostream>

    template < typename value_type >
    struct your_policy {
    static
    value_type write_to_register ( value_type value ) {
  23. Re: storing unsigned short value into a byte array

    You and Codeplug have been a blessing. Almost there! So bottom line is: Endian issues between machines is a 'non issue' with the first approach. The 'cost' though is 4 bytes.. ( a factor of 2...
  24. Re: storing unsigned short value into a byte array

    [QUOTE=Lindley;1883207]Since a short is 2 bytes, you could serialize a short into only 2 chars if you wanted. QUOTE]

    Just so I'm clear. As in (?):


    uv[ 0 ] = 'C'
    uv[ 1 ] = '2'
    uv[ 2 ] = 'C'...
  25. Re: storing unsigned short value into a byte array

    Excellent! Could you elaborate on item 1 for me?
Results 1 to 25 of 383
Page 1 of 16 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center