check.cpp File Reference


Detailed Description

Command-line utility which can work with (partial or complete) solutions found by nucad.

Definition in file check.cpp.

#include "CaDesigner.h"
#include "CaFactory.h"
#include "Color.h"
#include <getopt.h>

Include dependency graph for check.cpp:

Go to the source code of this file.

Functions

void usage (const char *name, int status)
 Print usage for executable.
void writeRules (GaCaRules *rules, size_t caSize, std::ostream &str)
 Write CA's rules to stream in human-readable format.
int main (int argc, char *argv[])

Variables

static struct option const long_opts []


Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 97 of file check.cpp.

References C_LIGHT_RED, C_NO_COLOR, CaEvaluator::caSize(), CaEvaluator::cntSteps(), CaEvaluatorFactory::create(), Color::enable(), CaEvaluator::eval(), long_opts, CaEvaluatorFactory::printList(), RULE_WIDTH, CaEvaluator::simulate(), GaCaRules::size(), usage(), and writeRules().

Here is the call graph for this function:

void @6::usage ( const char *  name,
int  status 
) [static]

Print usage for executable.

Parameters:
name Name of the executable (usually argv[0]).
status Expected status code ought to be returned.

Definition at line 59 of file check.cpp.

Referenced by main().

Here is the caller graph for this function:

void @6::writeRules ( GaCaRules rules,
size_t  caSize,
std::ostream &  str 
) [static]

Write CA's rules to stream in human-readable format.

Parameters:
rules The CA's rules to write.
str Standard output stream to write to.

Definition at line 81 of file check.cpp.

References C_LIGHT_PURPLE, C_NO_COLOR, GaCaRules::getRuleAtPos(), and writeRule().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

struct option const long_opts[] [static]

Initial value:

 {
    { "echo",       no_argument,        0, 'e' },
    { "input",      required_argument,  0, 'i' },
    { "list",       no_argument,        0, 'l' },
    { "quiet",      no_argument,        0, 'q' },
    { "rules",      no_argument,        0, 'r' },
    { "simulate",   no_argument,        0, 's' },
    { "help",       no_argument,        0, 'h' },

    
    { NULL, 0, NULL, 0}
}

Definition at line 40 of file check.cpp.

Referenced by main().


Generated on Sat May 2 16:39:34 2009 for nucad by  doxygen 1.5.4