59 lines
2.1 KiB
C++
59 lines
2.1 KiB
C++
/*=============================================================================
|
|
*
|
|
* Filename: CPAChanl.cpp
|
|
* Version: 1.0
|
|
* Date: 03/11/97
|
|
* Author: Marc Trabucato
|
|
*
|
|
* Description: implementation of CPA_Channel class (decendant of CPA_SaveObject)
|
|
* that contains description of a channel
|
|
*
|
|
*===========================================================================*/
|
|
|
|
#ifdef ACTIVE_EDITOR
|
|
|
|
#include "stdafx.h"
|
|
// ALX
|
|
#include "ACP_Base.h"
|
|
#include "TFA.h"
|
|
#include "x:\cpa\main\inc\_editid.h"
|
|
|
|
/*=============================================================================
|
|
* class CPA_Channel
|
|
=============================================================================*/
|
|
|
|
/*-----------------------------------------------------------------------------
|
|
* Description : constructor (call CPA_SaveObject constructor)
|
|
*---------------------------------------------------------------------------*/
|
|
CPA_Channel::CPA_Channel(CPA_EditorBase *_p_oEditor, CPA_Family *_p_oOwnerFamily, char *_szChannelName, long _lChannelNumber)
|
|
:CPA_SaveObject(_p_oEditor, C_szChannelTypeName, E_ss_NoSave, _p_oOwnerFamily, TRUE, NULL, NULL)
|
|
{
|
|
// Section init & File Section Init
|
|
char szReferencedSectionName[SCR_CV_ui_Cfg_MaxLenName];
|
|
strcat( szReferencedSectionName, _p_oOwnerFamily -> fn_p_szGetName() );
|
|
strcat( szReferencedSectionName, "-" );
|
|
strcat( szReferencedSectionName, _szChannelName );
|
|
|
|
SetReferencedSectionName( szReferencedSectionName );
|
|
SetSectionData( NULL );
|
|
// Name
|
|
if( fn_eRename( _szChannelName ? _szChannelName : "" ) != E_mc_None )
|
|
SetDefaultValidName();
|
|
|
|
// init data
|
|
m_lChannelNumber = _lChannelNumber;
|
|
}
|
|
|
|
/* -----------------03/11/97 10:27-------------------
|
|
*
|
|
* --------------------------------------------------*/
|
|
CString CPA_Channel::fn_csComputeReferencedSectionName(const CString csNewName)
|
|
{
|
|
CString csSectionName;
|
|
|
|
csSectionName = GetOwner() -> GetName() + "-" + csNewName;
|
|
return csSectionName;
|
|
}
|
|
|
|
#endif /* ACTIVE_EDITOR */
|