So I have defined 2 classes in 2 separate Apps. One of them is class writer/reader that writes/reads to/from a file and the other is a uplink which requires reading from said file and uploading via a data connection. these classes are defined in 2 separate Apps i.e. they have their own .adef files. Now How do I share the functions that are defined in the reader/writer class to be used by the uplink class? I know that I need to define an api file but where is this file going to reside? My structure is as such:
Project_dir:
ReaderWriterApp
.adef
Component_dir
UplinkApp
.adef
Component_dir
Should the .api file reside in the Project_dir? Also How to share a function that is defined within a class? Should i be sharing the whole class or write a function that is a wrapper around declaring an object of that class and then the required functions?
one more thing: When I define my api file like such:
FUNCTION string read();
it gives me an error: reader.api:1:1: error: unknown type 'string'
I want my function to return a C++ string though?