1 #include "bbstdASCII.h"
2 #include "bbstdPackage.h"
6 BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,ASCII);
7 BBTK_BLACK_BOX_IMPLEMENTATION(ASCII,bbtk::AtomicBlackBox);
12 std::string result("");
13 if (bbGetInputIn()!=""){
15 if (bbGetInputType()==0){
16 std::string commandstr(bbGetInputIn());
19 pos2 = commandstr.find(" ",pos1);
26 ccommand=commandstr.substr(pos1,commandstr.length()-pos1 );
28 ccommand=commandstr.substr(pos1,pos2-pos1);
30 asciiValue = atoi( ccommand.c_str() );
31 sprintf(strTmp,"%c",asciiValue);
35 pos2 = commandstr.find(" ",pos2+1);
39 if (bbGetInputType()==1){
40 int i,size=bbGetInputIn().size();
42 asciiValue = (int)bbGetInputIn()[i];
43 sprintf(strTmp,"%d",asciiValue);
51 bbSetOutputOut( result );
54 void ASCII::bbUserConstructor()
60 void ASCII::bbUserCopyConstructor()
64 void ASCII::bbUserDestructor()