Creating a custom vector source

Hi everyone,

hope this is not a silly question: Is it possible to subclass
gr_vector_source to create a custom vector source? I already have the
C code to create my vector.


Trond D.

On Wed, Jan 24, 2007 at 03:26:51PM +0100, Trond D. wrote:

Hi everyone,

hope this is not a silly question: Is it possible to subclass
gr_vector_source to create a custom vector source? I already have the
C code to create my vector.


Trond D.

Although this is possible, I don’t think it’s what you want. For
example, the vector source has an instance variable that is of the
type of the vector. I suspect that your derived class would ignore
that and add another instance variable.

It’s probably simpler just to inherit from gr_sync_block.

In truth, with regard to gr_vector_source_* we use an ad hoc code
generation system to generate all of these. We’d use C++ templates,
but that wouldn’t help us with the .i file.

Eric

2007/1/24, Eric B. [email protected]:

Although this is possible, I don’t think it’s what you want. For
Eric

Thanks for your reply. I will look into it a bit further, maybe I will
just convert the code generator code to python or copy some of the
code from gr_vector_source.

Trond D.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs