--- In [email protected], "Jimmy J. Johnson" <boxer...@...> wrote:
>
> I know this is really basic for everyone here, but I have not
> used C++ in years and need a little help understanding what
> this signature for the header file is telling me.
> 
> This is from the Fantom API for the Lego Mindstorms robot.
> 
> nFANTOM100_kExport static iNXTIterator* _VI_FUNCC
> createNXTIterator(
>                ViBoolean searchBluetooth, ViUInt32
> bluetoothSearchTimeoutInSeconds,
>                tStatus& status );
> 
> 
> 1.  What is nFANTOM100_kExport?

It's a macro conditionally defined in platform.h...

   #ifdef   nFANTOM100_kExportSymbols
      #define nFANTOM100_kExport __attribute__ ((section ("__TEXT,__export")))
   #else
      #define nFANTOM100_kExport
   #endif

> 2.  What does "static" mean in this context?

You haven't shown the context![1] You've only shown the function
declarator. But in the full context, inside a class declaration,
it means the function is not tied to a specific instance of
an iNXT object, but is a 'global' function owned by the iNXT
class.

[1] The static keyword has almost a dozen different meanings
in different contexts!

> 3.  What is "_VI_FUNCC"?

It's a macro conditionally defined in visatype.h e.g. for
WIN32 implementations...

  #define _VI_FUNCC           __cdecl

It relates to calling conventions. The library has C linkage.

> 4.  What is a "ViBoolean" and "ViUInt32" as opposed to a
> boolean or unsigned integer?

It's a platform dependant typedef (type synonym) conditionally
defined in visatype.h.

> 5.  What is the "&" on tStatus?  Does that mean it take
> the "address of" or reference to a tStatus object and
> not the object itself?

It means status is a reference to an object of type tStatus,
not a copy of one. [Pass by reference, not value.]

-- 
Peter

Reply via email to