Main Page | Namespace List | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

NCapture.h File Reference

(description) More...

#include <MonsterworksCopyright.h>
#include <string>

Include dependency graph for NCapture.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.


namespace  monsterworks
namespace  monsterworks::cgi
namespace  monsterworks::cgi::NCapture


void Initialize (int argc, char *argv[], char *env[], char *inCaptureFile)
 decide if we're using old data or stashing new data
std::string GetEnvironmentVariable (const std::string &inName)
 return an environment variable
std::string GetStandardInput ()
 return the standard input

Detailed Description


2004/03/05 19:49:08

Copyright (c) 2004 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 version 2.

This program is distributed in the hope that it wil be found useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MECHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Gnu Public License in the documentation or read the source of MonsterworksCopyright.h.

You should have received a copy of the GNU General Public Licence along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307 USA.

Definition in file NCapture.h.

Function Documentation

std::string monsterworks::cgi::NCapture::GetEnvironmentVariable const std::string &  inName  ) 

return an environment variable

This method currently assumes that useOldData = false.

the value of the environment variable or the empty string if the variable is not set.
inName  the name of the variable whose value is to be returned
Definition at line 90 of file NCapture.cp.

Referenced by monsterworks::cgi::NEnvironment::GetValue().

std::string monsterworks::cgi::NCapture::GetStandardInput  ) 

return the standard input

This method currently assumes that useOldData = false.

the value of std::cin in the form of a string.
Definition at line 105 of file NCapture.cp.

References ourStandardInput.

Referenced by NFormInitialize().

void monsterworks::cgi::NCapture::Initialize int  argc,
char *  argv[],
char *  env[],
char *  inCaptureFile

decide if we're using old data or stashing new data

Initializes the NCapture namespace. If you intend to either capture CGI information to a file or read CGI information from a file, you will need to call this function in main() before accessing any of the monsterworks::cgi functions or std::cin.

This determines whether we are reading data in or writing data out based on whether the cgi application was launched with an argument (which will be the file to read) or not.

argc  the number of arguments
argv  the arguments
env  the environment variables
inCaptureFile  the file to store the data
Definition at line 61 of file NCapture.cp.

References useOldData, and WriteData().

monsterworks Code by Monsterworks. Made available under the GNU Public License.
Documentation by doxygen.