Commit 81e5eb8f authored by Ryan Berkheimer's avatar Ryan Berkheimer

implemented all list creation/entry addition methods. updated implementation...

implemented all list creation/entry addition methods. updated implementation of methodID signature retrieval methods to use strcmp
parent 749b3fe7
Pipeline #5744 failed with stages
in 0 seconds
......@@ -9,5 +9,5 @@
"connections": [{"id": "conn-1",
"collections": ["coll-1"],
"constructor": {"directory-fields": "directory",
"server": "ftp-dev.ncdc.noaa.gov"}}]
"server": "ftp.ncdc.noaa.gov"}}]
}
\ No newline at end of file
......@@ -123,19 +123,19 @@ public:
struct val_list *getListEntry(struct val_list *list, int index);
/*List Creation Method*/
struct val_list *createList(); //TODO
struct val_list *createList();
/*List Entry Insertion Methods*/
void addJListEntry(struct val_list *list, jobject val); //TODO
void addIntEntry(struct val_list *list, int val); //TODO
void addLongEntry(struct val_list *list, long val); //TODO
void addFloatEntry(struct val_list *list, float val); //TODO
void addDoubleEntry(struct val_list *list, double val); //TODO
void addByteEntry(struct val_list *list, signed char val); //TODO
void addStringEntry(struct val_list *list, const char *val); //TODO
void addBoolEntry(struct val_list *list, bool val); //TODO
void addShortEntry(struct val_list *list, short val); //TODO
void addListEntry(struct val_list *list, struct val_list *val); //TODO
void addEntry(struct val_list *list, struct list_entry *entry);
void addIntEntry(struct val_list *list, int val);
void addLongEntry(struct val_list *list, long val);
void addFloatEntry(struct val_list *list, float val);
void addDoubleEntry(struct val_list *list, double val);
void addByteEntry(struct val_list *list, signed char val);
void addStringEntry(struct val_list *list, const char *val);
void addBoolEntry(struct val_list *list, bool val);
void addShortEntry(struct val_list *list, short val);
void addListEntry(struct val_list *list, struct val_list *val);
private :
/*Global References*/
......@@ -204,7 +204,7 @@ private :
jmethodID setConditionValueMethodId;
/*List Utility Methods*/
jmethodID createJListMethodId;
jmethodID createJArrayListMethodId;
jmethodID getJListSizeMethodId;
jmethodID addJListItemMethodId;
jmethodID getJListItemMethodId;
......@@ -252,7 +252,8 @@ private :
/*Utility methods for java list operations*/
int getJListLength(jobject jList);
struct string_list *translateFromJavaStringList(jobject jList);
jobject getJListEntry(struct val_list *list, int index);
jobject getObjectEntry(struct val_list *list, int index);
void addObjectEntry(struct val_list *list, jobject val);
/*Utility methods for java string operations*/
jstring toJavaString(const char *charString);
......
......@@ -434,6 +434,61 @@ extern "C"
return reinterpret_cast<MessageApiEndpoint *>(message)->getShortEntry(list, index);
}
struct val_list *createList(jlong message)
{
return reinterpret_cast<MessageApiEndpoint *>(message)->createList();
}
void addEntry(jlong message, struct val_list *list, struct list_entry *entry)
{
return reinterpret_cast<MessageApiEndpoint *>(message)->addEntry(list, entry);
}
void addIntEntry(jlong message, struct val_list *list, int val)
{
return reinterpret_cast<MessageApiEndpoint *>(message)->addIntEntry(list, val);
}
void addLongEntry(jlong message, struct val_list *list, long val)
{
return reinterpret_cast<MessageApiEndpoint *>(message)->addLongEntry(list, val);
}
void addFloatEntry(jlong message, struct val_list *list, float val)
{
return reinterpret_cast<MessageApiEndpoint *>(message)->addFloatEntry(list, val);
}
void addDoubleEntry(jlong message, struct val_list *list, double val)
{
return reinterpret_cast<MessageApiEndpoint *>(message)->addDoubleEntry(list, val);
}
void addByteEntry(jlong message, struct val_list *list, signed char val)
{
return reinterpret_cast<MessageApiEndpoint *>(message)->addByteEntry(list, val);
}
void addStringEntry(jlong message, struct val_list *list, const char *val)
{
return reinterpret_cast<MessageApiEndpoint *>(message)->addStringEntry(list, val);
}
void addBoolEntry(jlong message, struct val_list *list, bool val)
{
return reinterpret_cast<MessageApiEndpoint *>(message)->addBoolEntry(list, val);
}
void addShortEntry(jlong message, struct val_list *list, short val)
{
return reinterpret_cast<MessageApiEndpoint *>(message)->addShortEntry(list, val);
}
void addListEntry(jlong message, struct val_list *list, struct val_list *val)
{
return reinterpret_cast<MessageApiEndpoint *>(message)->addListEntry(list, val);
}
/*Packet Utils*/
void addPacketRecord(jlong message, struct packet *packet, struct record *record)
{
......
......@@ -101,6 +101,17 @@ extern "C"
short getShortEntry(jlong message, struct val_list *list, int index);
struct list_entry *getEntry(jlong message, struct val_list *list, int index);
struct val_list *getListEntry(jlong message, struct val_list *list, int index);
struct val_list *createList(jlong message);
void addEntry(jlong message, struct val_list *list, struct list_entry *entry);
void addIntEntry(jlong message, struct val_list *list, int val);
void addLongEntry(jlong message, struct val_list *list, long val);
void addFloatEntry(jlong message, struct val_list *list, float val);
void addDoubleEntry(jlong message, struct val_list *list, double val);
void addByteEntry(jlong message, struct val_list *list, signed char val);
void addStringEntry(jlong message, struct val_list *list, const char *val);
void addBoolEntry(jlong message, struct val_list *list, bool val);
void addShortEntry(jlong message, struct val_list *list, short val);
void addListEntry(jlong message, struct val_list *list, struct val_list *val);
/*Packet Methods*/
void addPacketRecord(jlong message, struct packet *packet, struct record *record);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment