C_mpmOverlay_unity::C_mpmOverlay_unity( s_env* aps_env) : C_mpmOverlay(aps_env) { // // ARGS // // DESC // Basically a thin "fall-through" constructor to the base // class. // // PRECONDITIONS // o aps_env must be fully instantiated. // // HISTORY // 14 December 2009 // o Initial design and coding. // debug_push("C_mpmOverlay_unity"); mstr_obj = "C_mpmProg_unity"; mstr_costWeightFile = "M_weights_unity.mat"; if(!costVector_read()) { costWeightVector_init(); costVector_write(); } mb_created = true; debug_pop(); }
void json_decoder_t::exit_field (const char *f) { // top level! if (!f) { return; } pop_back (); debug_pop (); }
C_mpmOverlay::C_mpmOverlay(const C_mpmOverlay &C_mpmOverlay) { // // Copy constructor // debug_push("C_mpmOverlay (copy constructor)"); error("Copy constructor not yet defined"); debug_pop(); }
C_mpmOverlay & C_mpmOverlay::operator=(const C_mpmOverlay & C_mpmOverlay) { // // Overloaded (=) operator // debug_push("operator="); error("Overloaded operator= not yet defined"); return *this; // Never executed -- debug_pop(); }
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(); }
static void prepare_attr_stack(const char *path, int dirlen, struct attr_stack **stack) { struct attr_stack *info; struct strbuf pathbuf = STRBUF_INIT; /* * At the bottom of the attribute stack is the built-in * set of attribute definitions, followed by the contents * of $(prefix)/etc/gitattributes and a file specified by * core.attributesfile. Then, contents from * .gitattribute files from directories closer to the * root to the ones in deeper directories are pushed * to the stack. Finally, at the very top of the stack * we always keep the contents of $GIT_DIR/info/attributes. * * When checking, we use entries from near the top of the * stack, preferring $GIT_DIR/info/attributes, then * .gitattributes in deeper directories to shallower ones, * and finally use the built-in set as the default. */ bootstrap_attr_stack(stack); /* * Pop the "info" one that is always at the top of the stack. */ info = *stack; *stack = info->prev; /* * Pop the ones from directories that are not the prefix of * the path we are checking. Break out of the loop when we see * the root one (whose origin is an empty string "") or the builtin * one (whose origin is NULL) without popping it. */ while ((*stack)->origin) { int namelen = (*stack)->originlen; struct attr_stack *elem; elem = *stack; if (namelen <= dirlen && !strncmp(elem->origin, path, namelen) && (!namelen || path[namelen] == '/')) break; debug_pop(elem); *stack = elem->prev; attr_stack_free(elem); } /* * bootstrap_attr_stack() should have added, and the * above loop should have stopped before popping, the * root element whose attr_stack->origin is set to an * empty string. */ assert((*stack)->origin); strbuf_addstr(&pathbuf, (*stack)->origin); /* Build up to the directory 'path' is in */ while (pathbuf.len < dirlen) { size_t len = pathbuf.len; struct attr_stack *next; char *origin; /* Skip path-separator */ if (len < dirlen && is_dir_sep(path[len])) len++; /* Find the end of the next component */ while (len < dirlen && !is_dir_sep(path[len])) len++; if (pathbuf.len > 0) strbuf_addch(&pathbuf, '/'); strbuf_add(&pathbuf, path + pathbuf.len, (len - pathbuf.len)); strbuf_addf(&pathbuf, "/%s", GITATTRIBUTES_FILE); next = read_attr(pathbuf.buf, 0); /* reset the pathbuf to not include "/.gitattributes" */ strbuf_setlen(&pathbuf, len); origin = xstrdup(pathbuf.buf); push_stack(stack, next, origin, len); } /* * Finally push the "info" one at the top of the stack. */ push_stack(stack, info, NULL, 0); strbuf_release(&pathbuf); }
void json_encoder_t::exit_slot (size_t i) { debug_pop (); pop_ref (); }
void json_decoder_t::exit_slot (size_t i) { pop_back (); debug_pop (); }