X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fappleutility%2FCAComponent.h;h=4009bc42fea06271253b6837b4eeb82b854594dc;hb=4b9e7386360746232dbdf2609b4e23ef02b0c5e9;hp=2ace42532d43982475ddbbd02ced204ee821521a;hpb=58b71b15d85fc23eb377bb629ba31811c20d0c32;p=ardour.git diff --git a/libs/appleutility/CAComponent.h b/libs/appleutility/CAComponent.h index 2ace42532d..4009bc42fe 100644 --- a/libs/appleutility/CAComponent.h +++ b/libs/appleutility/CAComponent.h @@ -37,7 +37,7 @@ */ /*============================================================================= CAComponent.h - + =============================================================================*/ #ifndef __CAComponent_h__ @@ -52,64 +52,64 @@ #include "CAComponentDescription.h" -class CAComponent +class CAComponent { public: CAComponent () : mComp (0), mDesc(), mManuName(0), mAUName(0), mCompName(0), mCompInfo (0) {} - + // if next is specifed that is used to find the next component after that one CAComponent (const ComponentDescription& inDesc, CAComponent* next = 0); - - CAComponent (const CAComponent& y) + + CAComponent (const CAComponent& y) : mComp (0), mDesc(), mManuName(0), mAUName(0), mCompName(0), mCompInfo (0) { *this = y; } CAComponent (const Component& comp); - + CAComponent (const ComponentInstance& compInst); CAComponent (OSType inType, OSType inSubtype = 0, OSType inManu = 0); - + ~CAComponent (); - + CAComponent& operator= (const CAComponent& y); - + // returns true if this object references a valid component bool IsValid () const { return Comp() != 0; } - + bool HasAUStrings() const { SetCompNames (); return mManuName != 0; } // CFStringRef should be retained by caller if needed beyond lifetime of this object - + // Can return NULL if component doesn't follow AU naming conventions CFStringRef GetAUManu () const { SetCompNames (); return mManuName; } CFStringRef GetAUName () const { SetCompNames (); return mAUName ? mAUName : mCompName; } - + // Return value of NULL indicates a problem getting that information from the component CFStringRef GetCompName () const { SetCompNames(); return mCompName; } CFStringRef GetCompInfo () const { SetCompInfo(); return mCompInfo; } - + const CAComponentDescription& Desc () const { return mDesc; } - - OSStatus Open (ComponentInstance& outInst) const + + OSStatus Open (ComponentInstance& outInst) const { return OpenAComponent (Comp(), &outInst); } OSStatus GetResourceVersion (UInt32 &outVersion) const; - + const Component& Comp() const { return mComp; } - + void Print(FILE* file = stdout) const; OSStatus Save (CFPropertyListRef *outData) const; - + OSStatus Restore (CFPropertyListRef &inData); - + private: Component mComp; CAComponentDescription mDesc; - + CFStringRef mManuName, mAUName, mCompName, mCompInfo; void SetCompNames () const;