This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Struct { | |
@Retention(RetentionPolicy.RUNTIME) | |
@Target(ElementType.FIELD) | |
public @interface Unsigned { | |
} | |
public void encode(ByteBuffer buffer) { | |
for (Field field : this.getClass().getDeclaredFields()) { | |
try { | |
Object value = field.get(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "TaggedPointer.h" | |
#include <stdlib.h> | |
#include <stdio.h> | |
typedef struct Header { | |
const void* tag; | |
} Header; | |
Header* base(void *tagged) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Boolean.h" | |
struct Boolean Boolean = { | |
0, | |
1, | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Bus.h" | |
#include <memory.h> | |
typedef struct SubscriptionList { | |
Subscription subscriptions[MAX_SUBSCRIBERS_PER_TOPIC]; | |
} SubscriptionList; | |
typedef struct Topic { | |
char* topicString; |