// -- This may look like C code, but it's really -*- C++ -*-
// RTSS --- Railway Total System Simulator
// (c) TAKAGI Ryo (at Kogakuin University)
// StrPrintf.hh --- struct StrPrintf
// -----
// ChangeLog:
// 2007. 11. 21
//  File created.
// -----


#ifndef ___StrPrintf_HH
#define ___StrPrintf_HH	// こうしておくと2度インクルードしても大丈夫！

#include <string>
#include <cstdarg>

#ifndef ACTABLE_SIZE
#define ACTABLE_SIZE 5000
#endif // ACTABLE_SIZE

using std :: string ;


struct StrPrintf
  : public string
{
  StrPrintf ( const char * pcFormat, ... ) 
  {
    va_list valist ;
    va_start ( valist , pcFormat ) ;
    char acTable [ ACTABLE_SIZE ] ;
    vsprintf ( acTable , pcFormat , valist ) ;
    assign ( acTable ) ;
    va_end ( valist ) ;
  }
} ;


#endif /* ! ___StrPrintf_HH */
