/*
 *
 * This file and its contents are the property of The MathWorks, Inc.
 * 
 * This file contains confidential proprietary information.
 * The reproduction, distribution, utilization or the communication
 * of this file or any part thereof is strictly prohibited.
 * Offenders will be held liable for the payment of damages.
 *
 * Copyright 1999-2012 The MathWorks, Inc.
 *
 */
#ifndef PST_STL_IOSFWD
#define PST_STL_IOSFWD

// for streamoff and streamsize
#include <__polyspace__typedefs.h>
// for the fpos_t type. 
#include <__polyspace__stdio.h>
// for the char_traits class.
#include <__polyspace__char_traits.h>
// determine whether to use the allocator class.
#include <__polyspace__allocator.h>

namespace std
{

#ifdef PST_VISUAL
#pragma pack(push, 8) /* push default value */
#endif

  template <class stateT>
  class fpos
  {
    public:
      fpos() {}
      fpos(int) {}
#ifdef PST_VISUAL
      fpos(stateT, fpos_t) {}
#endif
      //__ps_bool
      stateT    state() const { stateT * volatile ret; return *ret;}
      void      state(stateT s) {}
#ifdef PST_VISUAL
#if _MSC_VER <= 1200
      fpos_t get_fpos_t() const { volatile fpos_t random = 0; return random; }
#endif
      fpos_t seekpos() const { volatile fpos_t random = 0; return random; }
#endif
      operator  int() {volatile int ret = 0; return ret;}
      fpos<stateT>      &operator += (const fpos<stateT> &r){return *this;}
      fpos<stateT>      &operator -= (const fpos<stateT> &r){return *this;}
  };

class ios_base;

template <class charT, class traits = char_traits<charT> >
class basic_ios;

template <class charT, class traits = char_traits<charT> >
class basic_streambuf;

template <class charT, class traits = char_traits<charT> >
class basic_istream;

template <class charT, class traits = char_traits<charT> >
class basic_ostream;

template <class charT, class traits = char_traits<charT> >
class basic_iostream;

PST_TEMPLATE_DECL_DEF_FOR_BASIC_STRING_CLASSES(charT, traits, char_traits<charT>)
class basic_stringbuf;

PST_TEMPLATE_DECL_DEF_FOR_BASIC_STRING_CLASSES(charT, traits, char_traits<charT>)
class basic_istringstream;

PST_TEMPLATE_DECL_DEF_FOR_BASIC_STRING_CLASSES(charT, traits, char_traits<charT>)
class basic_ostringstream;

PST_TEMPLATE_DECL_DEF_FOR_BASIC_STRING_CLASSES(charT, traits, char_traits<charT>)
class basic_stringstream;

template <class charT, class traits = char_traits<charT> >
class basic_filebuf;

template <class charT, class traits = char_traits<charT> >
class basic_ifstream;

template <class charT, class traits = char_traits<charT> >
class basic_ofstream;

template <class charT, class traits = char_traits<charT> >
class basic_fstream;

// even if we does not define it, we MUST put this declartation in iosfwd
template<class charT, class traits=char_traits<charT> >
class istreambuf_iterator ;

template<class charT, class traits=char_traits<charT> >
class ostreambuf_iterator ;

struct __pst_smanip_typ ; // PST specific : return type for <iomanip> functions

typedef basic_ios<char>		ios;
typedef basic_ios<wchar_t>	wios;

typedef basic_streambuf<char>	streambuf;
typedef basic_istream<char>	istream;
typedef basic_ostream<char>	ostream;
typedef basic_iostream<char>	iostream;

typedef basic_stringbuf<char>		stringbuf;
typedef basic_istringstream<char>	istringstream;
typedef basic_ostringstream<char>	ostringstream;
typedef basic_stringstream<char>	stringstream;

typedef basic_filebuf<char>		filebuf;
typedef basic_ifstream<char>		ifstream;
typedef basic_ofstream<char>		ofstream;
typedef basic_fstream<char>		fstream;

typedef basic_streambuf<wchar_t> wstreambuf;
typedef basic_istream<wchar_t>	 wistream;
typedef basic_ostream<wchar_t>	 wostream;
typedef basic_iostream<wchar_t>	 wiostream;

typedef basic_stringbuf<wchar_t>	wstringbuf;
typedef basic_istringstream<wchar_t>	wistringstream;
typedef basic_ostringstream<wchar_t>	wostringstream;
typedef basic_stringstream<wchar_t>	wstringstream;

typedef basic_filebuf<wchar_t>		wfilebuf;
typedef basic_ifstream<wchar_t>		wifstream;
typedef basic_ofstream<wchar_t>		wofstream;
typedef basic_fstream<wchar_t>		wfstream;

#ifdef PST_VISUAL
#pragma pack(pop) /* pop back to previous value */
#endif

}

#ifdef __PST_IMPLICIT_USING_STD
/* Implicitly include a using directive for the STD namespace when this
   preprocessing flag is TRUE. */
using namespace std;
#endif /* ifdef __PST_IMPLICIT_USING_STD */

#endif /* PST_STL_IOSFWD */



