// @(#)root/xml:$Id$
// Author: Sergey Linev  10.05.2004

/*************************************************************************
 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TXMLPlayer
#define ROOT_TXMLPlayer

#ifndef ROOT_TObject
#include "TObject.h"
#endif

#ifndef ROOT_TList
#include "TList.h"
#endif

#ifndef ROOT_TXMLSetup
#include "TXMLSetup.h"
#endif

class TStreamerInfo;
class TStreamerElement;
class TStreamerSTL;
class TDataMember;

class TXMLPlayer : public TObject {
   public:
      TXMLPlayer();
      virtual ~TXMLPlayer();

      Bool_t ProduceCode(TList* cllist, const char* filename);

   protected:

      TString GetStreamerName(TClass* cl);

      const char* ElementGetter(TClass* cl, const char* membername, int specials = 0);
      const char* ElementSetter(TClass* cl, const char* membername, char* endch);

      TString GetMemberTypeName(TDataMember* member);
      TString GetBasicTypeName(TStreamerElement* el);
      TString GetBasicTypeReaderMethodName(Int_t type, const char* realname);
      void ProduceStreamerSource(std::ostream& fs, TClass* cl, TList* cllist);

      void ReadSTLarg(std::ostream& fs, TString& argname, int argtyp, Bool_t isargptr, TClass* argcl, TString& tname, TString& ifcond);
      void WriteSTLarg(std::ostream& fs, const char* accname, int argtyp, Bool_t isargptr, TClass* argcl);
      Bool_t ProduceSTLstreamer(std::ostream& fs, TClass* cl, TStreamerSTL* el, Bool_t isWriting);

      TString fGetterName;                   //!  buffer for name of getter method
      TString fSetterName;                   //!  buffer for name of setter method
      TXMLSetup fXmlSetup;                   //!  buffer for xml names convertion

   ClassDef(TXMLPlayer,1) // Generation of external xml streamers
};

#endif
 TXMLPlayer.h:1
 TXMLPlayer.h:2
 TXMLPlayer.h:3
 TXMLPlayer.h:4
 TXMLPlayer.h:5
 TXMLPlayer.h:6
 TXMLPlayer.h:7
 TXMLPlayer.h:8
 TXMLPlayer.h:9
 TXMLPlayer.h:10
 TXMLPlayer.h:11
 TXMLPlayer.h:12
 TXMLPlayer.h:13
 TXMLPlayer.h:14
 TXMLPlayer.h:15
 TXMLPlayer.h:16
 TXMLPlayer.h:17
 TXMLPlayer.h:18
 TXMLPlayer.h:19
 TXMLPlayer.h:20
 TXMLPlayer.h:21
 TXMLPlayer.h:22
 TXMLPlayer.h:23
 TXMLPlayer.h:24
 TXMLPlayer.h:25
 TXMLPlayer.h:26
 TXMLPlayer.h:27
 TXMLPlayer.h:28
 TXMLPlayer.h:29
 TXMLPlayer.h:30
 TXMLPlayer.h:31
 TXMLPlayer.h:32
 TXMLPlayer.h:33
 TXMLPlayer.h:34
 TXMLPlayer.h:35
 TXMLPlayer.h:36
 TXMLPlayer.h:37
 TXMLPlayer.h:38
 TXMLPlayer.h:39
 TXMLPlayer.h:40
 TXMLPlayer.h:41
 TXMLPlayer.h:42
 TXMLPlayer.h:43
 TXMLPlayer.h:44
 TXMLPlayer.h:45
 TXMLPlayer.h:46
 TXMLPlayer.h:47
 TXMLPlayer.h:48
 TXMLPlayer.h:49
 TXMLPlayer.h:50
 TXMLPlayer.h:51
 TXMLPlayer.h:52
 TXMLPlayer.h:53
 TXMLPlayer.h:54
 TXMLPlayer.h:55
 TXMLPlayer.h:56
 TXMLPlayer.h:57
 TXMLPlayer.h:58
 TXMLPlayer.h:59
 TXMLPlayer.h:60
 TXMLPlayer.h:61
 TXMLPlayer.h:62