VirtualBox

Changeset 25202 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Dec 4, 2009 7:13:21 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
55683
Message:

Main: make ParallelPort instance data private and make it use the XML settings struct for simplicity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/ParallelPortImpl.h

    r24989 r25202  
    4040{
    4141public:
    42 
    43     struct Data
    44     {
    45         Data()
    46             : mSlot (0)
    47             , mEnabled (FALSE)
    48             , mIRQ (4)
    49             , mIOBase (0x378)
    50         {}
    51 
    52         bool operator== (const Data &that) const
    53         {
    54             return this == &that ||
    55                    (mSlot == that.mSlot &&
    56                     mEnabled == that.mEnabled &&
    57                     mIRQ == that.mIRQ &&
    58                     mIOBase == that.mIOBase &&
    59                     mPath == that.mPath);
    60         }
    61 
    62         ULONG mSlot;
    63         BOOL  mEnabled;
    64         ULONG mIRQ;
    65         ULONG mIOBase;
    66         Bstr  mPath;
    67     };
    68 
    6942    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (ParallelPort)
    7043
     
    7952    END_COM_MAP()
    8053
    81     DECLARE_EMPTY_CTOR_DTOR (ParallelPort)
     54    ParallelPort() {}
     55    ~ParallelPort() {}
    8256
    8357    HRESULT FinalConstruct();
     
    10680    HRESULT saveSettings(settings::ParallelPort &data);
    10781
    108     bool isModified() { AutoWriteLock alock (this); return mData.isBackedUp(); }
    109     bool isReallyModified() { AutoWriteLock alock (this); return mData.hasActualChanges(); }
     82    bool isModified();
     83    bool isReallyModified();
    11084    bool rollback();
    11185    void commit();
    112     void copyFrom (ParallelPort *aThat);
     86    void copyFrom(ParallelPort *aThat);
    11387
    11488    // public methods for internal purposes only
     
    12094private:
    12195
    122     HRESULT checkSetPath (CBSTR aPath);
     96    HRESULT checkSetPath(const Utf8Str &str);
    12397
    124     const ComObjPtr<Machine, ComWeakRef> mParent;
    125     const ComObjPtr<ParallelPort> mPeer;
    126 
    127     Backupable<Data> mData;
     98    struct Data;
     99    Data *m;
    128100};
    129101
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette