コード例 #1
0
ファイル: uvwframe.cpp プロジェクト: Mankua/uvwframe
void UVWFrameObject::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev )
{
	this->ip = ip;
	assert(ip);

	if (flags&BEGIN_EDIT_CREATE)	creating = TRUE;
	else							creating = FALSE;

	UVWFrameCD.BeginEditParams(ip, this, flags, prev);
	shelp_param_blk.SetUserDlgProc(new UVWFrameDlgProc(this));

	SetNodeName();
}
コード例 #2
0
ファイル: uvwframe.cpp プロジェクト: Mankua/uvwframe
// TLTODO:	Implementar UNDO / REDO
BOOL UVWFrameObject::AddUVWMesh(INode *node)
	{
	if (node->TestForLoop(FOREVER,this)==REF_SUCCEED) {
		TimeValue t = ip->GetTime();

		ReplaceReference(UVW_MESH_REF,(RefTargetHandle)node);

		NotifyDependents(FOREVER,PART_ALL,REFMSG_CHANGE);
		SetNodeName();
		return TRUE;
	} else {
		return FALSE;
		}
	}
コード例 #3
0
ファイル: manifest_setup.c プロジェクト: alepharchives/zerovm
/* construct system_manifest object and initialize it from manifest */
void SystemManifestCtor(struct NaClApp *nap)
{
  struct SystemManifest *policy;

  /* check for design errors */
  assert(nap != NULL);
  assert(nap->system_manifest != NULL);

  policy = nap->system_manifest;
  policy->syscallback = 0;

  /* get zerovm settings from manifest */
  policy->version = GetValueByKey("Version");
  policy->nexe_etag = GetValueByKey("NexeEtag");

  /* check mandatory manifest keys */
  ZLOGFAIL(nap->system_manifest->version == NULL, EFAULT,
      "the manifest version is not provided");
  ZLOGFAIL(STRCMP(nap->system_manifest->version, MANIFEST_VERSION),
      EFAULT, "manifest version not supported");
  SetTimeout(policy);

  /* user data (environment, command line) */
  policy->envp = NULL;
  SetCustomAttributes(policy);

  /* prepare command line arguments for nexe */
  policy->cmd_line = NULL;
  policy->cmd_line_size = 0;
  SetCommandLine(policy);

  /* get node name and id */
  SetNodeName(nap);

  /* construct and initialize all channels */
  ChannelsCtor(nap);

  /*
   * allocate "whole memory chunk" if specified. should be the last allocation
   * in raw because after chunk allocated there will be no free user memory
   * note: will set "heap_ptr"
   */
  GET_INT_BY_KEY(nap->heap_end, "MemMax");
  PreallocateUserMemory(nap);

  /* zerovm return code */
  nap->system_manifest->ret_code = OK_CODE;
}
コード例 #4
0
bool model::DbContainerModel::setData(const QModelIndex& index, const QVariant& value, int role /*= Qt::EditRole*/)
{
	TreeNode* node = Index2Node(index);
	if (node != nullptr)
	{
		switch (role)
		{
		case ItemNameRole:
			SetNodeName(index, value.toString());
			break;
		default:
			return QAbstractItemModel::setData(index, value, role);
		}
		return true;
	}
	return false;
}