home *** CD-ROM | disk | FTP | other *** search
- #pragma once
-
- #include <string>
-
- class CAEDescriptor {
- public:
- AEDesc mDesc;
-
- // These operators sometimes let you appear to pass
- // the CAEDescriptor object rather than having to pass the
- // object.mDesc.
- operator AEDesc*() { return &mDesc; }
- operator AEDesc&() { return mDesc; }
- operator const AEDesc*() const { return &mDesc; }
- operator const AEDesc&() const { return mDesc; }
-
- CAEDescriptor(const AEDesc* inDesc);
- CAEDescriptor();
- CAEDescriptor(
- const AEDesc &inDesc,
- AEKeyword inKeyword,
- DescType inDesiredType = typeWildCard);
- CAEDescriptor(DescType inType, const void *inData, SInt32 inSize);
- CAEDescriptor(Boolean inValue);
- CAEDescriptor(SInt16 inValue);
- CAEDescriptor(SInt32 inValue);
- CAEDescriptor(OSType inValue);
- CAEDescriptor(ConstStringPtr inString);
- CAEDescriptor(const FSSpec&);
- CAEDescriptor(const CAEDescriptor& inOther);
- ~CAEDescriptor();
-
- static CAEDescriptor MakeList();
- CAEDescriptor& operator=(const CAEDescriptor& rhs );
- void swap(CAEDescriptor& inOther);
-
- bool HasData() const;
- bool IsList() const;
- int Count() const;
- CAEDescriptor At(int index) const;
- std::string AsString() const;
-
- void Put(int index, DescType inType, const void *inData, SInt32 inSize);
- void Put(int index, const CAEDescriptor&);
- CAEDescriptor Coerce(DescType inType) const;
-
- void GetParamDesc(const AppleEvent& inAppleEvent, AEKeyword inKeyword,
- DescType inDesiredType);
- void GetOptionalParamDesc(const AppleEvent& inAppleEvent,
- AEKeyword inKeyword, DescType inDesiredType);
- };
-