AString NgAppCmdInteractionProgramParameters::GetInputProjProp() const { const ValueBase* vb = m_namedProps.GetPropertyValue(kInputProjStr); SS_ASSERT(vb); if (!vb) return ACHAR(""); return ValueUtil::GetStringInsideQuotes(vb->GetStringValue()); }
void PR(){ pair * p; tagged * t; obj y = TOS(); if (AFIX(y)) printf ("%ld", OBJ2FIX(y)); else if (ACHAR(y)){ char * utf8 = cpt2utf8(OBJ2CHAR(y)); printf ("%s", utf8); free(utf8); } else if (ASYM(y)) printf ("%s", ((symbol *)y)->value); else if (AFLOAT(y)) printf ("%g", ((flonum*)y)->value); else if (ASTR(y)) printf ("%s", str2utf8 ((string *) y)); else if (AFN(y)) printf ("#<procedure>"); else if (ATBL(y)) pr_tbl((table *) y); else if (ATAG(y)){ t = (tagged *) y; printf ("#3(tagged "); PUSH(t->ctype); PR(); printf (" "); TOS() = t->content; PR(); sp--; printf (")"); } else if (APAIR(y)){ printf ("("); while (APAIR(y)){ p = (pair *) y; PUSH(p->car); PR(); sp--; y = p->cdr; if (APAIR(y)) printf (" "); } if (y != SYM2OBJ("nil")){ PUSH(y); printf (" . "); PR(); sp--; } printf (")"); } }
void NgAppCmdInteractionProgramParameters::InitiliazeObjectPropertySpec() { m_namedProps.InitializePropertySpec(kProgNameStr, ACHAR("interrupt")); m_namedProps.InitializePropertySpec(kProgParamsStr, ACHAR("")); m_namedProps.InitializePropertySpec(kInputProjStr, ACHAR("")); }
NgAppCmdInteractionProgramParameters::NgAppCmdInteractionProgramParameters() : m_namedProps(ACHAR("NgAppCmdInteractionProgramParameters")) { InitiliazeObjectPropertySpec(); }
#include "headers.h" #include "NgAppCmdInteractionProgramParameters.h" #include "ngcore/ngutils/ans_debug.h" #include "CoreInterfaces/IMessageManager.h" #include "ngcore/messagelibni/AnsoftMessage.h" #include "ngcore/ngutils/ans_debug.h" #include "CoreInterfaces/IMessageManager.h" #include "ngcore/messagelibni/AnsoftMessage.h" #include "ngcore/streamio/block.h" static const AChar* kProgNameStr = ACHAR("ProgName"); static const AChar* kProgParamsStr = ACHAR("ProgParams"); static const AChar* kInputProjStr = ACHAR("InputProj"); NgAppCmdInteractionProgramParameters::NgAppCmdInteractionProgramParameters() : m_namedProps(ACHAR("NgAppCmdInteractionProgramParameters")) { InitiliazeObjectPropertySpec(); } NgAppCmdInteractionProgramParameters::~NgAppCmdInteractionProgramParameters() { } AString NgAppCmdInteractionProgramParameters::GetProgNameProp() const { const ValueBase* vb = m_namedProps.GetPropertyValue(kProgNameStr); SS_ASSERT(vb); if (!vb) return ACHAR(""); return ValueUtil::GetStringInsideQuotes(vb->GetStringValue());