Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) TestTimedServerPusher

 

TestTimedServerPusher is a web application to test the WtTimedServerPusher and WtTimedServerPusherClient in the form of an edit widget, that can be viewed and edited by multiple visitors at the same time.

 

 

 

 

 

Downloads

 

Technical facts

 

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

 

 

 

 

 

Qt project file: ./ToolTestTimedServerPusher/ToolTestTimedServerPusherConsole.pro

 

include(../../ConsoleApplication.pri)

include(../../Libraries/Boost.pri)

include(../../Classes/CppAbout/CppAbout.pri)
include(../../Classes/CppFileIo/CppFileIo.pri)
include(../../Classes/CppHelp/CppHelp.pri)
include(../../Classes/CppMenuDialog/CppMenuDialog.pri)
include(../../Classes/CppRichelBilderbeekProgram/CppRichelBilderbeekProgram.pri)
include(../../Classes/CppTrace/CppTrace.pri)

include(../../Classes/CppCanvas/CppCanvas.pri)
include(../../Classes/CppImageCanvas/CppImageCanvas.pri)
#include(../../Classes/CppDotMatrix/CppDotMatrix.pri)
include(../../Classes/CppXml/CppXml.pri)
include(ToolAsciiArterConsole.pri )

SOURCES += main.cpp

 

 

 

 

 

Qt project file: ./ToolTestTimedServerPusher/ToolTestTimedServerPusherDesktop.pro

 

include(../../DesktopApplication.pri)
include(../../Libraries/Boost.pri)
include(../../Libraries/GeneralConsole.pri)
include(../../Libraries/GeneralDesktop.pri)

#Specific, console
include(../../Classes/CppCanvas/CppCanvas.pri)
include(../../Classes/CppDotMatrix/CppDotMatrix.pri)
include(../../Classes/CppImageCanvas/CppImageCanvas.pri)
#
include(ToolAsciiArterDesktop.pri)

SOURCES += qtmain.cpp

 

 

 

 

 

Qt project file: ./ToolTestTimedServerPusher/ToolTestTimedServerPusherWebsite.pro

 

include(../../Libraries/BoostAll.pri)
include(../../Libraries/Wt.pri)
include(../../WebApplication.pri)

include(../../Libraries/GeneralConsole.pri)
include(../../Libraries/GeneralWeb.pri)

include(../../Classes/CppWtTimedServerPusher/CppWtTimedServerPusher.pri)

include(ToolTestTimedServerPusherWebsite.pri)

SOURCES += wtmain.cpp

 

 

 

 

 

./ToolTestTimedServerPusher/ToolTestTimedServerPusherConsole.pri

 

INCLUDEPATH += \
    ../../Tools/ToolTestTimedServerPusher

SOURCES += \
    ../../Tools/ToolTestTimedServerPusher/testtimedserverpusherdata.cpp \
    ../../Tools/ToolTestTimedServerPusher/testtimedserverpushermenudialog.cpp \

HEADERS += \
    ../../Tools/ToolTestTimedServerPusher/testtimedserverpusherdata.h \
    ../../Tools/ToolTestTimedServerPusher/testtimedserverpushermenudialog.h \

OTHER_FILES += \
    ../../Tools/ToolTestTimedServerPusher/Licence.txt

 

 

 

 

 

./ToolTestTimedServerPusher/ToolTestTimedServerPusherDesktop.pri

 

include(../../Tools/ToolAsciiArter/ToolAsciiArterConsole.pri)

FORMS += \
    ../../Tools/ToolAsciiArter/qtasciiartermenudialog.ui \
    ../../Tools/ToolAsciiArter/qtasciiartermaindialog.ui


SOURCES += \
    ../../Tools/ToolAsciiArter/qtasciiartermenudialog.cpp \
    ../../Tools/ToolAsciiArter/qtasciiartermaindialog.cpp

HEADERS += \
    ../../Tools/ToolAsciiArter/qtasciiartermenudialog.h \
    ../../Tools/ToolAsciiArter/qtasciiartermaindialog.h

 

 

 

 

 

./ToolTestTimedServerPusher/ToolTestTimedServerPusherWebsite.pri

 

include(../../Tools/ToolTestTimedServerPusher/ToolTestTimedServerPusherConsole.pri)

SOURCES += \
    ../../Tools/ToolTestTimedServerPusher/wttesttimedserverpushermaindialog.cpp \
    ../../Tools/ToolTestTimedServerPusher/wttesttimedserverpushermenudialog.cpp \


HEADERS += \
    ../../Tools/ToolTestTimedServerPusher/wttesttimedserverpushermaindialog.h \
    ../../Tools/ToolTestTimedServerPusher/wttesttimedserverpushermenudialog.h

 

 

 

 

 

./ToolTestTimedServerPusher/testtimedserverpusherdata.h

 

//---------------------------------------------------------------------------
/*
TestTimedServerPusher, tool to test WtTimedServerPusher
Copyright (C) 2011-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestTimedServerPusher.htm
//---------------------------------------------------------------------------
#ifndef TOOLTESTTIMEDSERVERPUSHERDATA_H
#define TOOLTESTTIMEDSERVERPUSHERDATA_H

#include <chrono>
#include <regex>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#include <boost/checked_delete.hpp>
#pragma GCC diagnostic pop

namespace ribi {
namespace ToolTestTimedServerPusher {

///Data is a Singleton
struct Data
{
  ///Get the Data single instance
  static Data * GetInstance();

  ///Get the data
  std::string GetData() const;

  private:
  ///Data constructor
  Data();

  ///Data destructor
  ~Data();

  ///Only let a smart pointer (that is, m_instance) delete Data
  friend void boost::checked_delete<>(Data*);

  static Data * m_instance;

  static std::mutex m_mutex;

  ///The program its starting time
  const std::time_t m_time_start;
  //std::chrono::system_clock::time_point m_s;

  ///The number of times the data has been requested
  mutable int m_requested;
};


} //~namespace ToolTestTimedServerPusher
} //~namespace ribi

#endif // TOOLTESTTIMEDSERVERPUSHERDATA_H

 

 

 

 

 

./ToolTestTimedServerPusher/testtimedserverpusherdata.cpp

 

//---------------------------------------------------------------------------
/*
TestTimedServerPusher, tool to test WtTimedServerPusher
Copyright (C) 2011-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestTimedServerPusher.htm
//---------------------------------------------------------------------------
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#include <boost/lexical_cast.hpp>
#include "testtimedserverpusherdata.h"
#pragma GCC diagnostic pop

ribi::ToolTestTimedServerPusher::Data * ribi::ToolTestTimedServerPusher::Data::m_instance = 0;

std::mutex ribi::ToolTestTimedServerPusher::Data::m_mutex;

ribi::ToolTestTimedServerPusher::Data::Data()
  : m_time_start(std::time(0)),
  //m_s(std::chrono::system_clock::now()),
  m_requested(0)

{

}

ribi::ToolTestTimedServerPusher::Data::~Data()
{

}

ribi::ToolTestTimedServerPusher::Data * ribi::ToolTestTimedServerPusher::Data::GetInstance()
{
  if (!m_instance)
  {
    //Double-lock idiom
    std::lock_guard<std::mutex> lock(m_mutex);
    if (!m_instance)
    {
      m_instance = new Data;
    }
  }
  return m_instance;
}

std::string ribi::ToolTestTimedServerPusher::Data::GetData() const
{
  std::lock_guard<std::mutex> lock(m_mutex);
  //std::chrono::system_clock::time_point now = std::chrono::system_clock::now();
  //std::chrono::duration<int,1> d = now - m_s;
  //const std::string s = std::lexical_cast<std::string>(d);
  ++m_requested;
  const std::string s = boost::lexical_cast<std::string>(
    std::difftime(std::time(0),m_time_start))
    + std::string(" seconds, ")
    + boost::lexical_cast<std::string>(m_requested)
    + std::string(" requests ");
  return s;
}

 

 

 

 

 

./ToolTestTimedServerPusher/testtimedserverpushermenudialog.h

 

//---------------------------------------------------------------------------
/*
TestTimedServerPusher, tool to test WtTimedServerPusher
Copyright (C) 2011-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestTimedServerPusher.htm
//---------------------------------------------------------------------------
#ifndef TESTTIMEDSERVERPUSHERMENUDIALOG_H
#define TESTTIMEDSERVERPUSHERMENUDIALOG_H

#include <string>
#include <vector>

#include "about.h"

namespace ribi {
namespace ToolTestTimedServerPusher {

///The GUI independent part of the menu
struct MenuDialog
{
  ///Get this class its version
  static std::string GetVersion();

  ///Get this class its version history
  static std::vector<std::string> GetVersionHistory();

  ///Get this class its About
  static const About GetAbout();
};

} //~namespace ToolTestTimedServerPusher

} //~namespace ribi

#endif // TESTTIMEDSERVERPUSHERMENUDIALOG_H

 

 

 

 

 

./ToolTestTimedServerPusher/testtimedserverpushermenudialog.cpp

 

//---------------------------------------------------------------------------
/*
TestTimedServerPusher, tool to test WtTimedServerPusher
Copyright (C) 2011-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestTimedServerPusher.htm
//---------------------------------------------------------------------------
#include "testtimedserverpushermenudialog.h"

#include "about.h"

const ribi::About ribi::ToolTestTimedServerPusher::MenuDialog::GetAbout()
{
  About a(
    "Richel Bilderbeek",
    "TestTimedServerPusher",
    "tool to test WtTimedServerPusher",
    "the 5th of August 2011",
    "2011-2015",
    "http://www.richelbilderbeek.nl/ToolTestTimedServerPusher.htm",
    GetVersion(),
    GetVersionHistory());
  return a;
}

std::string ribi::ToolTestTimedServerPusher::MenuDialog::GetVersion()
{
  return "1.0";
}

std::vector<std::string> ribi::ToolTestTimedServerPusher::MenuDialog::GetVersionHistory()
{
  return {
    "2011-08-05: Version 1.0: initial version, derived from TestBroadcastServer"
  };
}

 

 

 

 

 

./ToolTestTimedServerPusher/wtmain.cpp

 

//---------------------------------------------------------------------------
/*
TestTimedServerPusher, tool to test WtServerPusher
Copyright (C) 2011-2014 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestTimedServerPusher.htm
//---------------------------------------------------------------------------
#include <iostream>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#include <boost/program_options.hpp>

#include <Wt/WApplication>
#include <Wt/WEnvironment>
#include <Wt/WText>

#include "wtautoconfig.h"
#include "wttimedserverpusher.h"
#include "wttesttimedserverpushermenudialog.h"
#pragma GCC diagnostic pop

struct WtApplication : public Wt::WApplication
{
  WtApplication(const Wt::WEnvironment& env)
  : WApplication(env)
  {
    setTitle("TestTimedServerPusher");
    this->useStyleSheet("wt.css");
    root()->addWidget(new ribi::ToolTestTimedServerPusher::WtMenuDialog);
  }
};

Wt::WApplication *createApplication(const Wt::WEnvironment& env)
{
  return new WtApplication(env);
}

int main(int argc, char **argv)
{
  ribi::WtAutoConfig::SaveDefaultStylesheet();
  ribi::WtAutoConfig a(argc,argv,createApplication);
  return a.Run();
}

 

 

 

 

 

./ToolTestTimedServerPusher/wttesttimedserverpushermaindialog.h

 

//---------------------------------------------------------------------------
/*
TestTimedServerPusher, tool to test WtTimedServerPusher
Copyright (C) 2011-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestTimedServerPusher.htm
//---------------------------------------------------------------------------
#ifndef WTTESTTIMEDSERVERPUSHERMAINDIALOG_H
#define WTTESTTIMEDSERVERPUSHERMAINDIALOG_H

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#include <Wt/WContainerWidget>

#include "wttimedserverpusherclient.h"
#pragma GCC diagnostic pop

namespace Wt
{
  struct WLineEdit;
}

namespace ribi {
namespace ToolTestTimedServerPusher {

///TestTimedServerPusher its main dialog
struct WtMainDialog : public Wt::WContainerWidget, WtTimedServerPusherClient
{
  WtMainDialog();

  private:
  ///The user interface
  struct Ui
  {
    Ui() : m_text(0) {}
    Wt::WText * m_text;
  } ui;


  ///The server updates the page
  void OnTimedServerPush();
};

} //~namespace ToolTestTimedServerPusher

} //~namespace ribi


#endif // WTTESTTIMEDSERVERPUSHERMAINDIALOG_H

 

 

 

 

 

./ToolTestTimedServerPusher/wttesttimedserverpushermaindialog.cpp

 

//---------------------------------------------------------------------------
/*
TestTimedServerPusher, tool to test WtTimedServerPusher
Copyright (C) 2011-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestTimedServerPusher.htm
//---------------------------------------------------------------------------
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#include <boost/lexical_cast.hpp>
#include <boost/numeric/conversion/cast.hpp>

#include <Wt/WContainerWidget>
#include <Wt/WText>

#include "testtimedserverpusherdata.h"
#include "testtimedserverpushermenudialog.h"
#include "wttesttimedserverpushermaindialog.h"
#include "wttimedserverpusher.h"
#include "wtaboutdialog.h"
#pragma GCC diagnostic pop

ribi::ToolTestTimedServerPusher::WtMainDialog::WtMainDialog()
  : ui{}
{
  this->clear();
  this->setContentAlignment(Wt::AlignCenter);
  ui.m_text= new Wt::WText(this);
  OnTimedServerPush();
}

void ribi::ToolTestTimedServerPusher::WtMainDialog::OnTimedServerPush()
{
  ui.m_text->setText(ToolTestTimedServerPusher::Data::GetInstance()->GetData());

  if (std::rand() % 10)
  {
    const int new_interval = std::rand() % 5000;
    WtTimedServerPusher::GetInstance()->SetTime(new_interval);
    std::clog << "new_interval: " << new_interval << '\n';
  }
}

 

 

 

 

 

./ToolTestTimedServerPusher/wttesttimedserverpushermenudialog.h

 

//---------------------------------------------------------------------------
/*
TestTimedServerPusher, tool to test WtTimedServerPusher
Copyright (C) 2011-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestTimedServerPusher.htm
//---------------------------------------------------------------------------
#ifndef WTTESTTIMEDSERVERPUSHERMENUDIALOG_H
#define WTTESTTIMEDSERVERPUSHERMENUDIALOG_H

#include <Wt/WContainerWidget>

namespace ribi {
namespace ToolTestTimedServerPusher {

struct WtMenuDialog : public Wt::WContainerWidget
{
  WtMenuDialog();
  private:
  void CheckResources();
  Wt::WWidget * CreateNewAboutDialog();
  Wt::WWidget * CreateNewMainDialog() const;
  Wt::WWidget * CreateNewWelcomeDialog() const;
};

} //~namespace ToolTestTimedServerPusher

} //~namespace ribi

#endif // WTTESTTIMEDSERVERPUSHERMENUDIALOG_H

 

 

 

 

 

./ToolTestTimedServerPusher/wttesttimedserverpushermenudialog.cpp

 

//---------------------------------------------------------------------------
/*
TestTimedServerPusher, tool to test WtTimedServerPusher
Copyright (C) 2011-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestTimedServerPusher.htm
//---------------------------------------------------------------------------
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#include <Wt/WBreak>
#include <Wt/WContainerWidget>
#include <Wt/WLabel>
#include <Wt/WStackedWidget>
#include <Wt/WMenu>
#include <Wt/WMenuItem>

#include "testtimedserverpushermenudialog.h"
#include "wtaboutdialog.h"
#include "wtautoconfig.h"
#include "wttesttimedserverpushermaindialog.h"
#include "wttesttimedserverpushermenudialog.h"
#include "wttimedserverpusher.h"
#include "wttimedserverpusherclient.h"
#pragma GCC diagnostic pop

ribi::ToolTestTimedServerPusher::WtMenuDialog::WtMenuDialog()
{
this->setContentAlignment(Wt::AlignCenter);
  {
    Wt::WLabel * const title = new Wt::WLabel("TestTimedServerPusher");
    title->setStyleClass("title");
    this->addWidget(title);
  }
  //Menu
  {
    Wt::WStackedWidget * const contents = new Wt::WStackedWidget;
    Wt::WMenu * const menu = new Wt::WMenu(contents,Wt::Horizontal);
    //Using CSS styleclass is the best (only?) way to display the menu well
    menu->setStyleClass("menu");
    {
      Wt::WMenuItem * const item = new Wt::WMenuItem(
        "Welcome",
        CreateNewWelcomeDialog());
      menu->addItem(item);
    }
    {
      Wt::WMenuItem * const item = new Wt::WMenuItem(
        "Start",
        CreateNewMainDialog());
      menu->addItem(item);
    }
    {
      Wt::WMenuItem * const item = new Wt::WMenuItem(
        "About",
        CreateNewAboutDialog());
      menu->addItem(item);
    }
    //Display menu on top
    this->addWidget(menu);
    this->addWidget(new Wt::WBreak);
    //Display contents below menu
    this->addWidget(contents);
  }
}

Wt::WWidget * ribi::ToolTestTimedServerPusher::WtMenuDialog::CreateNewAboutDialog()
{
  About a = ToolTestTimedServerPusher::MenuDialog::GetAbout();
  a.AddLibrary("WtAutoConfig version: " + WtAutoConfig::GetVersion());
  a.AddLibrary("WtTimedServerPusher version: " + WtTimedServerPusher::GetVersion());
  a.AddLibrary("WtTimedServerPusherClient version: " + WtTimedServerPusherClient::GetVersion());
  WtAboutDialog * const d = new WtAboutDialog(a,false);
  assert(d);
  return d;
}

Wt::WWidget * ribi::ToolTestTimedServerPusher::WtMenuDialog::CreateNewMainDialog() const
{
  WtMainDialog * const d = new WtMainDialog;
  assert(d);
  return d;
}

Wt::WWidget * ribi::ToolTestTimedServerPusher::WtMenuDialog::CreateNewWelcomeDialog() const
{
  Wt::WContainerWidget * dialog = new Wt::WContainerWidget;
  dialog->setContentAlignment(Wt::AlignCenter);
  dialog->addWidget(new Wt::WBreak);
  new Wt::WLabel("Welcome to TestTimedServerPusher",dialog);
  new Wt::WBreak(dialog);
  new Wt::WBreak(dialog);
  new Wt::WLabel("TestTimedServerPusher demonstrates how to view the same changing info",dialog);
  new Wt::WBreak(dialog);
  new Wt::WLabel("from different browsers and/or computers",dialog);
  new Wt::WBreak(dialog);
  new Wt::WLabel("using the WtTimedServerPusher and WtTimedServerPusherClient classes",dialog);
  return dialog;
}

 

 

 

 

 

./ToolTestTimedServerPusher/helgrind.sh

 

#!/bin/sh
valgrind --tool=helgrind --log-file=helgrind.txt ../ToolTestTimedServerPusher-build-desktop/./ToolTestTimedServerPusher

 

 

 

 

 

./ToolTestTimedServerPusher/zip.sh

 

#!/bin/sh
#zip packs all the files to port into a single .zip file,
#minicking the same folder structure
#Folder structure
# *
#   * Classes
#     * CppAbout
#     * CppWtAboutDialog
#     * CppWtAutoConfig
#     * CppWtTimedServerPusher
#   * Tools
#    * ToolTestTimedServerPusher

echo "Removing old user information"
rm copy.txt
rm tmp.txt
rm ToolTestTimedServerPusher.pro.user

echo "Mimicking file structure"
mkdir temp_zip
mkdir temp_zip/Classes
mkdir temp_zip/Classes/CppAbout
mkdir temp_zip/Classes/CppWtAboutDialog
mkdir temp_zip/Classes/CppWtAutoConfig
mkdir temp_zip/Classes/CppWtTimedServerPusher

mkdir temp_zip/Tools
mkdir temp_zip/Tools/ToolTestTimedServerPusher

echo "Copying files"
cp ../../Classes/CppAbout/*.* temp_zip/Classes/CppAbout
cp ../../Classes/CppWtAboutDialog/*.* temp_zip/Classes/CppWtAboutDialog
cp ../../Classes/CppWtAutoConfig/*.* temp_zip/Classes/CppWtAutoConfig
cp ../../Classes/CppWtTimedServerPusher/*.* temp_zip/Classes/CppWtTimedServerPusher

cp ../../Tools/ToolTestTimedServerPusher/*.* temp_zip/Tools/ToolTestTimedServerPusher



FILENAME=ToolTestTimedServerPusherSource_1_0
ZIP_FILENAME=$FILENAME".zip"

echo "Remove previous zip"
rm $ZIP_FILENAME

#echo "Compressing files"
cd temp_zip
zip -r $FILENAME Classes
#zip -r $FILENAME Games
#zip -r $FILENAME Libraries
#zip -r $FILENAME Projects
zip -r $FILENAME Tools
cd ..
cp "temp_zip/"$ZIP_FILENAME $ZIP_FILENAME

echo "Cleaning up"

#Classes
rm temp_zip/Classes/CppAbout/*.*
rm temp_zip/Classes/CppWtAboutDialog/*.*
rm temp_zip/Classes/CppWtAutoConfig/*.*
rm temp_zip/Classes/CppWtTimedServerPusher/*.*
rmdir temp_zip/Classes/CppAbout
rmdir temp_zip/Classes/CppWtAboutDialog
rmdir temp_zip/Classes/CppWtAutoConfig
rmdir temp_zip/Classes/CppWtTimedServerPusher
rmdir temp_zip/Classes

#Tools
rm temp_zip/Tools/ToolTestTimedServerPusher/*.*
rmdir temp_zip/Tools/ToolTestTimedServerPusher
rmdir temp_zip/Tools
rm temp_zip/*.*
rmdir temp_zip
echo "Done"

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict

This page has been created by the tool CodeToHtml