Beispiel #1
0
void 
json_decoder_t::enter_field (const char *f) 
{
  // top level!
  if (!f) { return; }

  debug_push (f);
  ptr<pub3::expr_dict_t> d;
  ptr<pub3::expr_t> x;
  if (is_empty ()) { error_empty ("dictionary"); }
  else if (!(d = top ()->to_dict ())) {
    error_wrong_type ("dictionary", top ());
  } else if (!(x = d->lookup (f))) {
    error_generic (strbuf ("cannot find field '%s'", f));
  }
  push_back (x);
}
Beispiel #2
0
C_mpmOverlay_FScurvs::C_mpmOverlay_FScurvs(
    s_env*      aps_env,
    string	astr_costWeightFile) : C_mpmOverlay(aps_env)
{
    //
    // ARGS
    //
    // DESC
    // For each EOVERLAY "curvature", read the corresponding FreeSurfer
    // file into local structures.
    //
    // PRECONDITIONS
    // o aps_env must be fully instantiated.
    //
    // HISTORY
    // Late June 2010
    // o Initial design and coding.
    //

    debug_push("C_mpmOverlay_FScurvs");
    mstr_obj	= "C_mpmProg_FScurvs";
    
    if(astr_costWeightFile.length())
	mstr_costWeightFile	= astr_costWeightFile;
    else
	mstr_costWeightFile	= "M_weights_FScurvs.mat";

    if(!costVector_read()) {
	costWeightVector_init();
	costVector_write();
    }

    // Size of overlay arrays
    mv_size	= aps_env->pMS_curvature->nvertices;
    mb_created	= true;

    debug_pop();
}
Beispiel #3
0
void
json_XDR_t::debug_push_slot (size_t i)
{
  debug_push (strbuf ("[%zu]", i));
}