Exemplo n.º 1
0
/*
	save the instance resource into the stream
*/
static __bool _save_inst_res_proc(ITreeNode * nd, __bool firstVisit, f8_uint _s)
{
	IBlk * blk;
	ICBlk * cblk;
	struct cblk_link_t * lk;
	struct blk_pin_t  * p;
	struct cblk_pin_t * cp;
	IF8Stream * s;

	s = (IF8Stream*)_s;

	blk = __dcast__(ITreeNode, IBlk, nd);
	
	save_res_stream(&blk->uuid, s);

	if(blk->h.magic == CBLK_MAGIC){
		cblk = __dcast__(IBlk, ICBlk, (blk));
		
		lk = ICBlk_first_link(cblk);
		while(lk){
			save_res_stream(&lk->uuid, s);
			lk = ICBlk_next_link(lk);
		}

		p = __vcall__(blk, first_pin, (blk));
		while(p){
			cp = CONTAINING_RECORD(p, struct cblk_pin_t, p);
			save_res_stream(&cp->uuid, s);
			p = __vcall__(blk, next_pin, (p));
		}
	}
Exemplo n.º 2
0
static __bool _svr_proc(const f8_uuid * uuid, __int context)
{
	IF8Stream * s;

	s = (IF8Stream*)context;
	if(!get_res_int(uuid, "!readonly", 0)){
		save_res_stream(uuid, s);
	}
	return __true;
}