more acceptable hack to the workaround of nested classes not being able to see protec...
authorJosh Coalson <jcoalson@users.sourceforce.net>
Fri, 30 Jul 2004 00:02:33 +0000 (00:02 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Fri, 30 Jul 2004 00:02:33 +0000 (00:02 +0000)
include/FLAC++/decoder.h
include/FLAC++/encoder.h
include/OggFLAC++/decoder.h
include/OggFLAC++/encoder.h

index 35937ee..05aaadc 100644 (file)
@@ -142,8 +142,8 @@ namespace FLAC {
                        virtual void error_callback(::FLAC__StreamDecoderErrorStatus status) = 0;
 
 #if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
-               //@@@@@@ lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring(); fix properly later
-               public:
+                       // lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring()
+                       friend State;
 #endif
                        ::FLAC__StreamDecoder *decoder_;
                private:
@@ -237,8 +237,8 @@ namespace FLAC {
                        virtual void error_callback(::FLAC__StreamDecoderErrorStatus status) = 0;
 
 #if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
-               //@@@@@@ lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring(); fix properly later
-               public:
+                       // lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring()
+                       friend State;
 #endif
                        ::FLAC__SeekableStreamDecoder *decoder_;
                private:
@@ -330,8 +330,8 @@ namespace FLAC {
                        virtual void error_callback(::FLAC__StreamDecoderErrorStatus status) = 0;
 
 #if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
-               //@@@@@@ lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring(); fix properly later
-               public:
+                       // lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring()
+                       friend State;
 #endif
                        ::FLAC__FileDecoder *decoder_;
                private:
index 1bc6411..5d5bd0e 100644 (file)
@@ -160,8 +160,8 @@ namespace FLAC {
                        virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata) = 0;
 
 #if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
-               //@@@@@@ lame hack: some MSVC/GCC versions can't see a protected encoder_ from nested State::resolved_as_cstring(); fix properly later
-               public:
+                       // lame hack: some MSVC/GCC versions can't see a protected encoder_ from nested State::resolved_as_cstring()
+                       friend State;
 #endif
                        ::FLAC__StreamEncoder *encoder_;
                private:
@@ -260,8 +260,8 @@ namespace FLAC {
                        virtual ::FLAC__StreamEncoderWriteStatus write_callback(const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame) = 0;
 
 #if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
-               //@@@@@@ lame hack: some MSVC/GCC versions can't see a protected encoder_ from nested State::resolved_as_cstring(); fix properly later
-               public:
+                       // lame hack: some MSVC/GCC versions can't see a protected encoder_ from nested State::resolved_as_cstring()
+                       friend State;
 #endif
                        ::FLAC__SeekableStreamEncoder *encoder_;
                private:
@@ -361,8 +361,8 @@ namespace FLAC {
                        virtual void progress_callback(FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate);
 
 #if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
-               //@@@@@@ lame hack: some MSVC/GCC versions can't see a protected encoder_ from nested State::resolved_as_cstring(); fix properly later
-               public:
+                       // lame hack: some MSVC/GCC versions can't see a protected encoder_ from nested State::resolved_as_cstring()
+                       friend State;
 #endif
                        ::FLAC__FileEncoder *encoder_;
                private:
index 97c8897..af09246 100644 (file)
@@ -145,8 +145,8 @@ namespace OggFLAC {
                        virtual void error_callback(::FLAC__StreamDecoderErrorStatus status) = 0;
 
 #if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
-               //@@@@@@ lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring(); fix properly later
-               public:
+                       // lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring()
+                       friend State;
 #endif
                        ::OggFLAC__StreamDecoder *decoder_;
                private:
@@ -241,8 +241,8 @@ namespace OggFLAC {
                        virtual void error_callback(::FLAC__StreamDecoderErrorStatus status) = 0;
 
 #if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
-               //@@@@@@ lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring(); fix properly later
-               public:
+                       // lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring()
+                       friend State;
 #endif
                        ::OggFLAC__SeekableStreamDecoder *decoder_;
                private:
@@ -335,8 +335,8 @@ namespace OggFLAC {
                        virtual void error_callback(::FLAC__StreamDecoderErrorStatus status) = 0;
 
 #if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
-               //@@@@@@ lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring(); fix properly later
-               public:
+                       // lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring()
+                       friend State;
 #endif
                        ::OggFLAC__FileDecoder *decoder_;
                private:
index 8c93ef9..2dadbc4 100644 (file)
@@ -163,8 +163,8 @@ namespace OggFLAC {
                        virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata) = 0;
 
 #if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
-               //@@@@@@ lame hack: some MSVC/GCC versions can't see a protected encoder_ from nested State::resolved_as_cstring(); fix properly later
-               public:
+                       // lame hack: some MSVC/GCC versions can't see a protected encoder_ from nested State::resolved_as_cstring()
+                       friend State;
 #endif
                        ::OggFLAC__StreamEncoder *encoder_;
                private:
@@ -264,8 +264,8 @@ namespace OggFLAC {
                        virtual ::FLAC__StreamEncoderWriteStatus write_callback(const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame) = 0;
 
 #if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
-               //@@@@@@ lame hack: some MSVC/GCC versions can't see a protected encoder_ from nested State::resolved_as_cstring(); fix properly later
-               public:
+                       // lame hack: some MSVC/GCC versions can't see a protected encoder_ from nested State::resolved_as_cstring()
+                       friend State;
 #endif
                        ::OggFLAC__SeekableStreamEncoder *encoder_;
                private:
@@ -366,8 +366,8 @@ namespace OggFLAC {
                        virtual void progress_callback(FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate);
 
 #if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
-               //@@@@@@ lame hack: some MSVC/GCC versions can't see a protected encoder_ from nested State::resolved_as_cstring(); fix properly later
-               public:
+                       // lame hack: some MSVC/GCC versions can't see a protected encoder_ from nested State::resolved_as_cstring()
+                       friend State;
 #endif
                        ::OggFLAC__FileEncoder *encoder_;
                private: