#include <DynamicType.hxx>
That is, it allows to add & remove fields or attributes at run time, optimizing this way the memory used. All the dynamic attributes are nevertheless perceived typed. So the compiler can garant the type consistency in every access to the dynamic attributes. It also allows herarchic structures and implements de Component interface so it can be stored all the tree (to XML format, for example) and can be copied (swallow or deep copy). (see the methods: SwallowCopy, DeepCopy and StoreOn )
In this class there is implemented all the memory management, but is an abstract class: to work with dynamic types, is necessary to define a concrete dynamic type (derives from this). A concrete dynamic type must be defined following a very specific set of rules; basically the attributes are registered using a macros mechanism that expand a known interface for accessing attributes.
As these methods are expanded by macros, they can not be documented inside the concrete dynamic type. Hence they will be documented here:
DynamicBranch
Definition at line 70 of file DynamicType.hxx.
Public Types | |
enum | { idLength = 120, typeLength = 120 } |
Public Member Functions | |
DynamicType (const int nAttr) | |
Constructs a DynamicType object that can hold. | |
DynamicType (const DynamicType &prototype, const bool shareData, const bool deepCopy) | |
Copy constructor of a dynamic Type. | |
DynamicType (const DynamicType &prototype) | |
virtual | ~DynamicType () |
virtual const char * | GetClassName () const =0 |
Return the class name. | |
void | CopyInit (const DynamicType &dt) |
This method allows custom code for the copy-constructor of a dynamic type, since the copy-constructor is macro expanded and can not be overwritted. | |
bool | UpdateData () |
Method used to resize the data space of the dynamic type, necessary when some AddXXX() / RemoveXXX() (where XXX is an attribute name) has been done. | |
unsigned | GetNDynamicAttributes () const |
const char * | GetDynamicAttributeName (unsigned i) |
virtual const std::type_info & | GetTypeId (unsigned i) const =0 |
bool | AttributeIsComponent (unsigned i) const |
bool | AttributeIsDynamictype (unsigned i) const |
bool | IsAttributeInstantiated (unsigned i) const |
const void * | GetAttributeAsVoidPtr (unsigned i) const |
const Component * | GetAttributeAsComponent (unsigned i) const |
Component * | GetAttributeAsComponent (unsigned i) |
void | FullfilsInvariant () const |
virtual Component * | DeepCopy () const |
void | Debug () const |
virtual void | StoreOn (CLAM::Storage &storage) const |
Stores component's subitems on the given Storage. | |
virtual void | LoadFrom (CLAM::Storage &storage) |
Loads component's subitems from the given Storage. | |
Protected Types | |
enum | { shrinkThreshold = 80 } |
Protected Member Functions | |
void | DefaultInit () |
The concrete dynamic type constructor calls DefaultInit(). | |
virtual void | InformAll () |
implemented by the macros in the concrete class. | |
void | InformTypedAttr_ (unsigned id, const char *name, unsigned size, const char *type, const bool isPtr, const t_new, const t_new_copy, const t_destructor, const Component *ptr) |
void | InformTypedAttr_ (unsigned id, const char *name, unsigned size, const char *type, const bool isPtr, const t_new, const t_new_copy, const t_destructor, const DynamicType *ptr) |
void | InformTypedAttr_ (unsigned id, const char *name, unsigned size, const char *type, const bool isPtr, const t_new, const t_new_copy, const t_destructor, const void *ptr) |
void | AddAttr_ (const unsigned i, const unsigned size) |
void | RemoveAttr_ (const unsigned id) |
virtual DynamicType & | GetDynamicTypeCopy (const bool shareData=false, const bool deep=false) const =0 |
virtual Component * | ShallowCopy () const |
DynamicType & | operator= (const DynamicType &source) |
unsigned | GetNumAttr () const |
unsigned | GetNumActiveAttr () const |
char * | GetData () const |
void | SetData (char *srcData) |
TDynInfo * | GetDynamicTable () const |
TAttr * | GetTypeDescTable () const |
unsigned | GetDataSize () const |
bool | IsInstanciate () const |
bool | OwnsItsMemory () const |
void | SetOwnsItsMemory (const bool owns) |
bool | ExistAttr (unsigned id) const |
void | SetPreAllocateAllAttributes () |
int | DynTableRefCounter () |
void | InitDynTableRefCounter () |
int | DecrementDynTableRefCounter () |
int | IncrementDynTableRefCounter () |
virtual void | StoreDynAttributes (CLAM::Storage &s) const =0 |
virtual void | LoadDynAttributes (CLAM::Storage &s)=0 |
template<typename AttribType> | |
void | StoreAttribute (StaticTrue *asLeave, CLAM::Storage &s, AttribType &object, const char *name) const |
template<typename AttribType> | |
void | StoreAttribute (StaticFalse *asLeave, CLAM::Storage &s, AttribType &object, const char *name) const |
template<typename AttribType> | |
void | StoreIterableAttribute (CLAM::Storage &s, AttribType &object, const char *name, const char *elemName) const |
template<typename AttribType> | |
bool | LoadAttribute (StaticTrue *asLeave, CLAM::Storage &s, AttribType &object, const char *name) |
template<typename AttribType> | |
bool | LoadAttribute (StaticFalse *asLeave, CLAM::Storage &s, AttribType &object, const char *name) |
template<typename AttribType> | |
bool | LoadIterableAttribute (CLAM::Storage &s, AttribType &object, const char *name, const char *elemName) |
Protected Attributes | |
unsigned | numActiveAttr |
char * | data |
TDynInfo * | dynamicTable |
TAttr * | typeDescTable |
unsigned | dataSize |
bool | bOwnsItsMemory |
unsigned | numAttr |
unsigned | maxAttrSize |
unsigned | allocatedDataSize |
Classes | |
class | AttributePositionBase |
struct | TAttr |
struct | TDynInfo |
anonymous enum |
anonymous enum [protected] |
CLAM::DynamicType::DynamicType | ( | const int | nAttr | ) |
Constructs a DynamicType object that can hold.
nAttr | attributes. This constructor must be only used from the concrete dyn. type constructor. This constructor creates a dynamic type that is a new prototype. That means that has its own dynamic information (which attrs. are instanciated, etc.) Furthermore, the new object is set owner of its memory. |
Definition at line 49 of file DynamicType.cxx.
References allocatedDataSize, bOwnsItsMemory, data, dataSize, dynamicTable, CLAM::DynamicType::TDynInfo::hasBeenAdded, CLAM::DynamicType::TDynInfo::hasBeenRemoved, InitDynTableRefCounter(), maxAttrSize, numActiveAttr, numAttr, and CLAM::DynamicType::TDynInfo::offs.
CLAM::DynamicType::DynamicType | ( | const DynamicType & | prototype, | |
const bool | shareData, | |||
const bool | deepCopy = true | |||
) |
Copy constructor of a dynamic Type.
This constructor must be only used from the concrete dyn. type constructor. The created object will use the dynamic type description of anotyer dynamic Type.
prototype | Another dynamic type from which the dynamic shape is taken. | |
shareData | Tells whether the new object will share the same data of the prototype, or not. |
Definition at line 72 of file DynamicType.cxx.
References allocatedDataSize, data, dataSize, dynamicTable, IsInstanciate(), numActiveAttr, and typeDescTable.
CLAM::DynamicType::DynamicType | ( | const DynamicType & | prototype | ) |
Definition at line 99 of file DynamicType.cxx.
References allocatedDataSize, bPreAllocateAllAttributes, data, dataSize, dynamicTable, FullfilsInvariant(), IsInstanciate(), numActiveAttr, and typeDescTable.
CLAM::DynamicType::~DynamicType | ( | ) | [virtual] |
Definition at line 122 of file DynamicType.cxx.
virtual const char* CLAM::DynamicType::GetClassName | ( | ) | const [pure virtual] |
Return the class name.
Implements CLAM::Component.
Implemented in CLAM::ProcessingConfig.
Referenced by Debug(), and FullfilsInvariant().
void CLAM::DynamicType::DefaultInit | ( | void | ) | [inline, protected] |
The concrete dynamic type constructor calls DefaultInit().
This allows user to initialize his/her object. But we define DefaultInit() here because we don't want to force writting one DefaultInit() function for each concrete dynamic type. If a dynamic type concrete class defines some (not-default) constructors, this should also call the DefaultInit().
Reimplemented in CLAM::Audio, CLAM::EnvelopeConfig, CLAM::Envelope, CLAM::Frame, CLAM::Fundamental, CLAM::LPModel, CLAM::MelCepstrum, CLAM::MelSpectrum, CLAM::Segment, CLAM::SpectralPeak, CLAM::SpectralPeakArray, CLAM::Spectrum, CLAM::SpectrumConfig, CLAM::MediaTime, CLAM::Melody, CLAM::MIDIMelody, CLAM::PitchNote, CLAM::PeriodogramPeak, CLAM::SpectralDescriptors, CLAM::BinaryControlOpConfig, CLAM::ControlConfig, CLAM::PrintControlConfig, CLAM::CepstralTransformConfig, CLAM::CircularShiftConfig, CLAM::CleanTracksConfig, CLAM::ERB_SpaceGenConfig, CLAM::FFTConfig, CLAM::FundFreqDetectConfig, CLAM::LPCConfig, CLAM::MelFilterBankConfig, CLAM::SegmentatorConfig, CLAM::SinTrackingConfig, CLAM::SpectralEnvelopeExtractConfig, CLAM::TonalAnalysisConfig, CLAM::WindowGeneratorConfig, CLAM::AudioAmplifierConfig, CLAM::AudioMixerConfig, CLAM::FrameInterpConfig, CLAM::PeaksInterpConfig, CLAM::SpecAdderConfig, CLAM::SpecInterpConfig, CLAM::MonoAudioFileReaderConfig, CLAM::MonoAudioFileWriterConfig, CLAM::MultiChannelAudioFileReaderConfig, CLAM::MultiChannelAudioFileWriterConfig, CLAM::AudioIOConfig, CLAM::AutoPannerConfig, CLAM::Control2DataConfig, CLAM::ControllerConfig, CLAM::ControlMapperConfig, CLAM::ControlSinkConfig, CLAM::ControlSourceConfig, CLAM::ControlTraceReaderConfig, CLAM::ControlTraceWriterConfig, CLAM::FlagControlConfig, CLAM::OutControlSenderConfig, CLAM::ADSRConfig, CLAM::DispatcherConfig, CLAM::OscillatorConfig, CLAM::SimpleOscillatorConfig, CLAM::WaveGeneratorConfig, CLAM::MIDIClockerConfig, CLAM::MIDIDispatcherConfig, CLAM::MIDIIOConfig, CLAM::SampleMetadata, CLAM::SDIFInConfig, CLAM::SDIFOutConfig, CLAM::SimpleLoopMetadata, CLAM::IFFTConfig, CLAM::OverlapAddConfig, CLAM::PhaseManagementConfig, CLAM::SynthSineSpectrumConfig, CLAM::EnvExtractorConfig, CLAM::EnvelopeGeneratorConfig, CLAM::EnvModulatorConfig, CLAM::FDFilterGenConfig, CLAM::NormalizationConfig, CLAM::SegmentSMSMorphConfig, CLAM::SegmentSMSTimeStretchConfig, CLAM::SegmentTransformationConfig, CLAM::SMSHarmonizerConfig, CLAM::SMSMorphConfig, CLAM::SMSTimeStretchConfig, CLAM::SMSTransformationChaineeConfig, CLAM::SMSTransformationChainConfig, CLAM::TokenDelayConfig, CLAM::AudioFileHeader, and CLAM::AudioTextDescriptors.
Definition at line 105 of file DynamicType.hxx.
virtual void CLAM::DynamicType::InformAll | ( | ) | [inline, protected, virtual] |
implemented by the macros in the concrete class.
Informs all attrs. to the typeDescTable. used in UpdateData().
Definition at line 113 of file DynamicType.hxx.
References CLAM_DEBUG_ASSERT, maxAttrSize, numAttr, CLAM::DynamicType::TAttr::offset, CLAM::DynamicType::TAttr::size, and typeDescTable.
void CLAM::DynamicType::CopyInit | ( | const DynamicType & | dt | ) | [inline] |
This method allows custom code for the copy-constructor of a dynamic type, since the copy-constructor is macro expanded and can not be overwritted.
If the writter of a concrete dynamic type writes more copy-constructors, he/she should include manually the call of the CopyInit(). Here we give the default (void) implementation.
Definition at line 133 of file DynamicType.hxx.
bool CLAM::DynamicType::UpdateData | ( | ) |
Method used to resize the data space of the dynamic type, necessary when some AddXXX() / RemoveXXX() (where XXX is an attribute name) has been done.
This operation does not check it if has been some attributes changes. In the case that the object is "not owner" of its memory this flag is changed to "owner", and a new data table is created.
Definition at line 296 of file DynamicType.cxx.
References allocatedDataSize, bOwnsItsMemory, dataSize, dynamicTable, FullfilsInvariant(), maxAttrSize, and shrinkThreshold.
Referenced by CLAM::AudioDescriptors::AudioDescriptors(), CLAM::ControlPrinter::ConcreteConfigure(), CLAM::Spectrum::Configure(), CLAM::Envelope::Configure(), CLAM::SampleMetadata::ConfigureAfterRestore(), CLAM::SMSTransformationChaineeConfig::CopyInit(), CLAM::DataUtil::CopyResidualSpectrumsMembers(), CLAM::DataUtil::CopySpectralPeakArraysMembers(), CLAM::WindowGeneratorConfig::DefaultInit(), CLAM::WaveGeneratorConfig::DefaultInit(), CLAM::TonalAnalysisConfig::DefaultInit(), CLAM::TokenDelayConfig::DefaultInit(), CLAM::SynthSineSpectrumConfig::DefaultInit(), CLAM::SpecInterpConfig::DefaultInit(), CLAM::SpecAdderConfig::DefaultInit(), CLAM::SpectrumConfig::DefaultInit(), CLAM::PeaksInterpConfig::DefaultInit(), CLAM::SpectralPeakArray::DefaultInit(), CLAM::SpectralPeak::DefaultInit(), CLAM::SpectralEnvelopeExtractConfig::DefaultInit(), CLAM::SMSTransformationChainConfig::DefaultInit(), CLAM::SMSTransformationChaineeConfig::DefaultInit(), CLAM::SMSTimeStretchConfig::DefaultInit(), CLAM::SMSMorphConfig::DefaultInit(), CLAM::SMSHarmonizerConfig::DefaultInit(), CLAM::SinTrackingConfig::DefaultInit(), CLAM::SimpleOscillatorConfig::DefaultInit(), CLAM::SimpleLoopMetadata::DefaultInit(), CLAM::SegmentTransformationConfig::DefaultInit(), CLAM::SegmentSMSTimeStretchConfig::DefaultInit(), CLAM::SegmentSMSMorphConfig::DefaultInit(), CLAM::SegmentatorConfig::DefaultInit(), CLAM::Segment::DefaultInit(), CLAM::SDIFOutConfig::DefaultInit(), CLAM::SDIFInConfig::DefaultInit(), CLAM::SampleMetadata::DefaultInit(), CLAM::PrintControlConfig::DefaultInit(), CLAM::PitchNote::DefaultInit(), CLAM::PhaseManagementConfig::DefaultInit(), CLAM::PeriodogramPeak::DefaultInit(), CLAM::OverlapAddConfig::DefaultInit(), CLAM::OutControlSenderConfig::DefaultInit(), CLAM::OscillatorConfig::DefaultInit(), CLAM::NormalizationConfig::DefaultInit(), CLAM::MultiChannelAudioFileWriterConfig::DefaultInit(), CLAM::MultiChannelAudioFileReaderConfig::DefaultInit(), CLAM::MonoAudioFileWriterConfig::DefaultInit(), CLAM::MonoAudioFileReaderConfig::DefaultInit(), CLAM::MIDIMelody::DefaultInit(), CLAM::MIDIIOConfig::DefaultInit(), CLAM::MIDIDispatcherConfig::DefaultInit(), CLAM::MIDIClockerConfig::DefaultInit(), CLAM::MelSpectrum::DefaultInit(), CLAM::Melody::DefaultInit(), CLAM::MelFilterBankConfig::DefaultInit(), CLAM::MelCepstrum::DefaultInit(), CLAM::MediaTime::DefaultInit(), CLAM::LPModel::DefaultInit(), CLAM::LPCConfig::DefaultInit(), CLAM::IFFTConfig::DefaultInit(), CLAM::FundFreqDetectConfig::DefaultInit(), CLAM::Fundamental::DefaultInit(), CLAM::FrameInterpConfig::DefaultInit(), CLAM::Frame::DefaultInit(), CLAM::FlagControlConfig::DefaultInit(), CLAM::FFTConfig::DefaultInit(), CLAM::FDFilterGenConfig::DefaultInit(), CLAM::ERB_SpaceGenConfig::DefaultInit(), CLAM::EnvModulatorConfig::DefaultInit(), CLAM::EnvelopeGeneratorConfig::DefaultInit(), CLAM::EnvExtractorConfig::DefaultInit(), CLAM::Envelope::DefaultInit(), CLAM::EnvelopeConfig::DefaultInit(), CLAM::DispatcherConfig::DefaultInit(), CLAM::ControlTraceReaderConfig::DefaultInit(), CLAM::ControlTraceWriterConfig::DefaultInit(), CLAM::ControlSourceConfig::DefaultInit(), CLAM::ControlSinkConfig::DefaultInit(), CLAM::ControlMapperConfig::DefaultInit(), CLAM::ControllerConfig::DefaultInit(), CLAM::ControlConfig::DefaultInit(), CLAM::Control2DataConfig::DefaultInit(), CLAM::CleanTracksConfig::DefaultInit(), CLAM::CircularShiftConfig::DefaultInit(), CLAM::CepstralTransformConfig::DefaultInit(), CLAM::BinaryControlOpConfig::DefaultInit(), CLAM::AutoPannerConfig::DefaultInit(), CLAM::AudioMixerConfig::DefaultInit(), CLAM::AudioIOConfig::DefaultInit(), CLAM::AudioAmplifierConfig::DefaultInit(), CLAM::Audio::DefaultInit(), CLAM::ADSRConfig::DefaultInit(), CLAM::SpectralPeakArrayAdder::Do(), CLAM::SMSAnalysis::Do(), CLAM::SinTracking::Do(), CLAM::LPC_AutoCorrelation::Do(), CLAM::FundFreqDetect::Do(), CLAM::FDFilterGen::Do(), CLAM::Envelope::Envelope(), CLAM::FrameDescriptors::FrameDescriptors(), CLAM::MIDI2Melody::GenerateOutputData(), CLAM::Spectrum::GetConfig(), CLAM::PhaseManagement::Init(), CLAM::SMSSineFilter::InitBPF(), CLAM::SMSSynthesis::InitFrame(), CLAM::SinusoidalSynthesis::InitFrame(), CLAM::SpectralPeakArray::InitFromPrototype(), CLAM::SpectralPeakArray::InitPeak(), CLAM::SpectralPeakArray::InitSpectralPeak(), CLAM::SegmentSMSMorph::LoadSDIF(), CLAM::SDIFIn::LoadSDIFDataIntoSegment(), CLAM::LoopingSDIFFileReader::LoopingSDIFFileReader(), CLAM::operator*(), CLAM::SpectralPeakArray::operator+(), CLAM::operator+(), CLAM::AudioFile::ResetHeaderData(), CLAM::AudioCodecs::PCMCodec::RetrieveHeaderData(), CLAM::AudioCodecs::OggVorbisCodec::RetrieveHeaderData(), CLAM::AudioCodecs::MpegCodec::RetrieveHeaderData(), CLAM::AudioCodecs::OggVorbisCodec::RetrieveTextDescriptors(), CLAM::AudioCodecs::MpegCodec::RetrieveTextDescriptors(), CLAM::SegmentSMSHarmonizer::SegmentSMSHarmonizer(), CLAM::Spectrum::SetBPFSize(), CLAM::AudioFile::SetHeader(), CLAM::Segment::SetHoldsData(), CLAM::FrameDescriptors::SetpFrame(), CLAM::SegmentDescriptors::SetpSegment(), CLAM::AudioFileHeader::SetValues(), CLAM::SMSSineFilter::SMSSineFilter(), CLAM::SpectralDescriptors::SpectralDescriptors(), CLAM::SpectralPeakDescriptors::SpectralPeakDescriptors(), CLAM::SpectralShapeShift::SpectralShapeShift(), and CLAM::Spectrum::SynchronizeTo().
void CLAM::DynamicType::InformTypedAttr_ | ( | unsigned | id, | |
const char * | name, | |||
unsigned | size, | |||
const char * | type, | |||
const bool | isPtr, | |||
const | t_new, | |||
const | t_new_copy, | |||
const | t_destructor, | |||
const Component * | ptr | |||
) | [inline, protected] |
Definition at line 403 of file DynamicType.hxx.
References CLAM::DynamicType::TAttr::isComponent, CLAM::DynamicType::TAttr::isDynamicType, CLAM::DynamicType::TAttr::isStorable, and typeDescTable.
void CLAM::DynamicType::InformTypedAttr_ | ( | unsigned | id, | |
const char * | name, | |||
unsigned | size, | |||
const char * | type, | |||
const bool | isPtr, | |||
const | t_new, | |||
const | t_new_copy, | |||
const | t_destructor, | |||
const DynamicType * | ptr | |||
) | [inline, protected] |
Definition at line 412 of file DynamicType.hxx.
References CLAM::DynamicType::TAttr::isComponent, CLAM::DynamicType::TAttr::isDynamicType, CLAM::DynamicType::TAttr::isStorable, and typeDescTable.
void CLAM::DynamicType::InformTypedAttr_ | ( | unsigned | id, | |
const char * | name, | |||
unsigned | size, | |||
const char * | type, | |||
const bool | isPtr, | |||
const | t_new, | |||
const | t_new_copy, | |||
const | t_destructor, | |||
const void * | ptr | |||
) | [inline, protected] |
Definition at line 394 of file DynamicType.hxx.
References CLAM::DynamicType::TAttr::isComponent, CLAM::DynamicType::TAttr::isDynamicType, CLAM::DynamicType::TAttr::isStorable, and typeDescTable.
Definition at line 185 of file DynamicType.cxx.
References dataSize, DecrementDynTableRefCounter(), dynamicTable, DynTableRefCounter(), FullfilsInvariant(), CLAM::DynamicType::TDynInfo::hasBeenAdded, CLAM::DynamicType::TDynInfo::hasBeenRemoved, InitDynTableRefCounter(), and numActiveAttr.
void CLAM::DynamicType::RemoveAttr_ | ( | const unsigned | id | ) | [protected] |
Definition at line 241 of file DynamicType.cxx.
References data, dataSize, DecrementDynTableRefCounter(), dynamicTable, DynTableRefCounter(), FullfilsInvariant(), CLAM::DynamicType::TDynInfo::hasBeenAdded, CLAM::DynamicType::TDynInfo::hasBeenRemoved, InitDynTableRefCounter(), numActiveAttr, CLAM::DynamicType::TAttr::size, and typeDescTable.
unsigned CLAM::DynamicType::GetNDynamicAttributes | ( | ) | const [inline] |
const char* CLAM::DynamicType::GetDynamicAttributeName | ( | unsigned | i | ) | [inline] |
Definition at line 173 of file DynamicType.hxx.
References CLAM::DynamicType::TAttr::id, and typeDescTable.
virtual const std::type_info& CLAM::DynamicType::GetTypeId | ( | unsigned | i | ) | const [pure virtual] |
Definition at line 175 of file DynamicType.hxx.
References CLAM::DynamicType::TAttr::isComponent, and typeDescTable.
Definition at line 176 of file DynamicType.hxx.
References CLAM::DynamicType::TAttr::isDynamicType, and typeDescTable.
Definition at line 177 of file DynamicType.hxx.
References dynamicTable, and CLAM::DynamicType::TDynInfo::offs.
const void* CLAM::DynamicType::GetAttributeAsVoidPtr | ( | unsigned | i | ) | const [inline] |
Definition at line 178 of file DynamicType.hxx.
void CLAM::DynamicType::FullfilsInvariant | ( | ) | const |
Definition at line 747 of file DynamicType.cxx.
References allocatedDataSize, data, dataSize, dynamicTable, GetClassName(), CLAM::DynamicType::TDynInfo::hasBeenAdded, CLAM::DynamicType::TDynInfo::hasBeenRemoved, CLAM::DynamicType::TDynInfo::offs, CLAM::DynamicType::TAttr::size, and typeDescTable.
Referenced by AddAttr_(), DynamicType(), operator=(), RemoveAttr_(), and UpdateData().
Component * CLAM::DynamicType::DeepCopy | ( | ) | const [virtual] |
Reimplemented from CLAM::Component.
Definition at line 630 of file DynamicType.cxx.
References GetDynamicTypeCopy().
virtual DynamicType& CLAM::DynamicType::GetDynamicTypeCopy | ( | const bool | shareData = false , |
|
const bool | deep = false | |||
) | const [protected, pure virtual] |
Referenced by DeepCopy(), and ShallowCopy().
Component * CLAM::DynamicType::ShallowCopy | ( | ) | const [protected, virtual] |
Reimplemented from CLAM::Component.
Definition at line 622 of file DynamicType.cxx.
References GetDynamicTypeCopy().
DynamicType & CLAM::DynamicType::operator= | ( | const DynamicType & | source | ) | [protected] |
unsigned CLAM::DynamicType::GetNumAttr | ( | ) | const [inline, protected] |
unsigned CLAM::DynamicType::GetNumActiveAttr | ( | ) | const [inline, protected] |
char* CLAM::DynamicType::GetData | ( | ) | const [inline, protected] |
void CLAM::DynamicType::SetData | ( | char * | srcData | ) | [inline, protected] |
TDynInfo* CLAM::DynamicType::GetDynamicTable | ( | ) | const [inline, protected] |
TAttr* CLAM::DynamicType::GetTypeDescTable | ( | ) | const [inline, protected] |
unsigned CLAM::DynamicType::GetDataSize | ( | ) | const [inline, protected] |
bool CLAM::DynamicType::IsInstanciate | ( | ) | const [inline, protected] |
bool CLAM::DynamicType::OwnsItsMemory | ( | ) | const [inline, protected] |
void CLAM::DynamicType::SetOwnsItsMemory | ( | const bool | owns | ) | [inline, protected] |
Definition at line 365 of file DynamicType.hxx.
References data, dynamicTable, CLAM::DynamicType::TDynInfo::hasBeenAdded, CLAM::DynamicType::TDynInfo::hasBeenRemoved, and CLAM::DynamicType::TDynInfo::offs.
Referenced by Debug().
void CLAM::DynamicType::SetPreAllocateAllAttributes | ( | ) | [inline, protected] |
Definition at line 242 of file DynamicType.hxx.
Referenced by CLAM::Spectrum::Configure(), and CLAM::SpectrumConfig::DefaultInit().
void CLAM::DynamicType::Debug | ( | ) | const |
Definition at line 823 of file DynamicType.cxx.
References allocatedDataSize, dataSize, CLAM::XmlStorage::Dump(), dynamicTable, ExistAttr(), GetClassName(), CLAM::DynamicType::TDynInfo::hasBeenAdded, CLAM::DynamicType::TDynInfo::hasBeenRemoved, CLAM::DynamicType::TAttr::id, CLAM::DynamicType::TAttr::isComponent, CLAM::DynamicType::TAttr::isDynamicType, CLAM::DynamicType::TAttr::isPointer, CLAM::DynamicType::TAttr::isStorable, maxAttrSize, CLAM::DynamicType::TDynInfo::offs, CLAM::DynamicType::TAttr::offset, CLAM::DynamicType::TAttr::size, CLAM::DynamicType::TAttr::type, and typeDescTable.
int CLAM::DynamicType::DynTableRefCounter | ( | ) | [inline, protected] |
Definition at line 595 of file DynamicType.cxx.
References dynamicTable, and CLAM::DynamicType::TDynInfo::offs.
Referenced by AddAttr_(), and RemoveAttr_().
void CLAM::DynamicType::InitDynTableRefCounter | ( | ) | [inline, protected] |
Definition at line 599 of file DynamicType.cxx.
References dynamicTable, and CLAM::DynamicType::TDynInfo::offs.
Referenced by AddAttr_(), DynamicType(), and RemoveAttr_().
int CLAM::DynamicType::DecrementDynTableRefCounter | ( | ) | [inline, protected] |
Definition at line 608 of file DynamicType.cxx.
References dynamicTable, and CLAM::DynamicType::TDynInfo::offs.
Referenced by AddAttr_(), and RemoveAttr_().
int CLAM::DynamicType::IncrementDynTableRefCounter | ( | ) | [inline, protected] |
Definition at line 612 of file DynamicType.cxx.
References dynamicTable, and CLAM::DynamicType::TDynInfo::offs.
virtual void CLAM::DynamicType::StoreOn | ( | CLAM::Storage & | storage | ) | const [inline, virtual] |
Stores component's subitems on the given Storage.
storage | The given storage where the subitem will be stored |
Implements CLAM::Component.
Reimplemented in CLAM::SMSTransformationChaineeConfig.
Definition at line 305 of file DynamicType.hxx.
References StoreDynAttributes().
Referenced by CLAM::SMSTransformationChaineeConfig::StoreOn().
virtual void CLAM::DynamicType::LoadFrom | ( | CLAM::Storage & | storage | ) | [inline, virtual] |
Loads component's subitems from the given Storage.
storage | The given storage where the subitem will be loaded from |
Implements CLAM::Component.
Reimplemented in CLAM::SMSTransformationChaineeConfig.
Definition at line 308 of file DynamicType.hxx.
References LoadDynAttributes().
Referenced by CLAM::SMSTransformationChaineeConfig::LoadFrom().
virtual void CLAM::DynamicType::StoreDynAttributes | ( | CLAM::Storage & | s | ) | const [protected, pure virtual] |
Referenced by StoreOn().
virtual void CLAM::DynamicType::LoadDynAttributes | ( | CLAM::Storage & | s | ) | [protected, pure virtual] |
Referenced by LoadFrom().
void CLAM::DynamicType::StoreAttribute | ( | StaticTrue * | asLeave, | |
CLAM::Storage & | s, | |||
AttribType & | object, | |||
const char * | name | |||
) | const [inline, protected] |
void CLAM::DynamicType::StoreAttribute | ( | StaticFalse * | asLeave, | |
CLAM::Storage & | s, | |||
AttribType & | object, | |||
const char * | name | |||
) | const [inline, protected] |
void CLAM::DynamicType::StoreIterableAttribute | ( | CLAM::Storage & | s, | |
AttribType & | object, | |||
const char * | name, | |||
const char * | elemName | |||
) | const [inline, protected] |
bool CLAM::DynamicType::LoadAttribute | ( | StaticTrue * | asLeave, | |
CLAM::Storage & | s, | |||
AttribType & | object, | |||
const char * | name | |||
) | [inline, protected] |
bool CLAM::DynamicType::LoadAttribute | ( | StaticFalse * | asLeave, | |
CLAM::Storage & | s, | |||
AttribType & | object, | |||
const char * | name | |||
) | [inline, protected] |
bool CLAM::DynamicType::LoadIterableAttribute | ( | CLAM::Storage & | s, | |
AttribType & | object, | |||
const char * | name, | |||
const char * | elemName | |||
) | [inline, protected] |
unsigned CLAM::DynamicType::numActiveAttr [protected] |
Definition at line 251 of file DynamicType.hxx.
Referenced by AddAttr_(), DynamicType(), GetNumActiveAttr(), and RemoveAttr_().
char* CLAM::DynamicType::data [protected] |
Definition at line 252 of file DynamicType.hxx.
Referenced by CLAM::SpectralDescriptors::ComputeLowFreqEnergyRelation(), CLAM::SpectralDescriptors::ComputeMaxMagFreq(), DynamicType(), ExistAttr(), FullfilsInvariant(), GetData(), IsInstanciate(), RemoveAttr_(), and SetData().
TDynInfo* CLAM::DynamicType::dynamicTable [protected] |
Definition at line 253 of file DynamicType.hxx.
Referenced by AddAttr_(), Debug(), DecrementDynTableRefCounter(), DynamicType(), DynTableRefCounter(), ExistAttr(), FullfilsInvariant(), GetDynamicTable(), IncrementDynTableRefCounter(), InitDynTableRefCounter(), IsAttributeInstantiated(), RemoveAttr_(), and UpdateData().
TAttr* CLAM::DynamicType::typeDescTable [protected] |
Definition at line 254 of file DynamicType.hxx.
Referenced by AttributeIsComponent(), AttributeIsDynamictype(), Debug(), DynamicType(), FullfilsInvariant(), GetAttributeAsComponent(), GetDynamicAttributeName(), GetTypeDescTable(), InformAll(), InformTypedAttr_(), and RemoveAttr_().
unsigned CLAM::DynamicType::dataSize [protected] |
Definition at line 255 of file DynamicType.hxx.
Referenced by AddAttr_(), Debug(), DynamicType(), FullfilsInvariant(), GetDataSize(), RemoveAttr_(), and UpdateData().
bool CLAM::DynamicType::bOwnsItsMemory [protected] |
Definition at line 256 of file DynamicType.hxx.
Referenced by DynamicType(), OwnsItsMemory(), SetOwnsItsMemory(), and UpdateData().
unsigned CLAM::DynamicType::numAttr [protected] |
Definition at line 257 of file DynamicType.hxx.
Referenced by DynamicType(), GetNDynamicAttributes(), GetNumAttr(), and InformAll().
unsigned CLAM::DynamicType::maxAttrSize [protected] |
Definition at line 258 of file DynamicType.hxx.
Referenced by Debug(), DynamicType(), InformAll(), and UpdateData().
unsigned CLAM::DynamicType::allocatedDataSize [protected] |
Definition at line 259 of file DynamicType.hxx.
Referenced by Debug(), DynamicType(), FullfilsInvariant(), and UpdateData().