コード例 #1
0
ファイル: GUIConfiguration.cpp プロジェクト: Ugnis/Far-NetBox
bool TCopyParamList::CompareItem(intptr_t Index,
  const TCopyParamType * CopyParam, const TCopyParamRule * Rule) const
{
  return
    ((*GetCopyParam(Index)) == *CopyParam) &&
    ((GetRule(Index) == nullptr) ?
      (Rule == nullptr) :
      ((Rule != nullptr) && (*GetRule(Index)) == (*Rule)));
}
コード例 #2
0
ファイル: GUIConfiguration.cpp プロジェクト: Ugnis/Far-NetBox
void TCopyParamList::Delete(intptr_t Index)
{
  DebugAssert((Index >= 0) && (Index < GetCount()));
  FNames->Delete(Index);
  delete GetCopyParam(Index);
  FCopyParams->Delete(Index);
  delete GetRule(Index);
  FRules->Delete(Index);
  Modify();
}
コード例 #3
0
ファイル: GUIConfiguration.cpp プロジェクト: Ugnis/Far-NetBox
void TCopyParamList::Clear()
{
  for (intptr_t Index = 0; Index < GetCount(); ++Index)
  {
    delete GetCopyParam(Index);
    delete GetRule(Index);
  }
  FCopyParams->Clear();
  FRules->Clear();
  FNames->Clear();
}
コード例 #4
0
//---------------------------------------------------------------------------
void TCopyParamList::Clear()
{
  for (intptr_t I = 0; I < GetCount(); I++)
  {
    delete GetCopyParam(I);
    delete GetRule(I);
  }
  FCopyParams->Clear();
  FRules->Clear();
  FNames->Clear();
}
コード例 #5
0
ファイル: GUIConfiguration.cpp プロジェクト: Ugnis/Far-NetBox
void TCopyParamList::Change(intptr_t Index, const UnicodeString & Name,
  TCopyParamType * CopyParam, TCopyParamRule * Rule)
{
  if ((Name != GetName(Index)) || !CompareItem(Index, CopyParam, Rule))
  {
    FNames->SetString(Index, Name);
    delete GetCopyParam(Index);
    FCopyParams->SetItem(Index, CopyParam);
    delete GetRule(Index);
    FRules->SetItem(Index, Rule);
    Modify();
  }
  else
  {
    SAFE_DESTROY(CopyParam);
    SAFE_DESTROY(Rule);
  }
}
コード例 #6
0
//---------------------------------------------------------------------------
void TCopyParamList::Change(intptr_t Index, const UnicodeString & Name,
  TCopyParamType * CopyParam, TCopyParamRule * Rule)
{
  if ((Name != GetName(Index)) || !CompareItem(Index, CopyParam, Rule))
  {
    FNames->SetString(Index, Name);
    delete GetCopyParam(Index);
    FCopyParams->SetItem(Index, reinterpret_cast<TObject *>(CopyParam));
    delete GetRule(Index);
    FRules->SetItem(Index, reinterpret_cast<TObject *>(Rule));
    Modify();
  }
  else
  {
    delete CopyParam;
    delete Rule;
  }
}