|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object CTL.CCompat.CArray<T>
public class CArray<T>
C++ array compatibility class
Field Summary | |
---|---|
private java.lang.Object[] |
arr
Actual array |
private TypeTree |
type
TypeTree for nested templated arrays |
Constructor Summary | |
---|---|
CArray()
Simple constructor |
|
CArray(int size)
Constructor with known array size |
Method Summary | |
---|---|
T |
get(int idx)
Get one element's value |
void |
read(SerialIn in)
Read from stream |
void |
read(SerialIn in,
int len)
Read from stream |
void |
set(int idx,
T value)
Set a new value for one element |
void |
setTypes(TypeTree[] types)
Template hack |
java.lang.String |
toString()
Conversion to string |
void |
write(SerialOut out)
Write to stream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.Object[] arr
private TypeTree type
Constructor Detail |
---|
public CArray()
public CArray(int size)
Method Detail |
---|
public void setTypes(TypeTree[] types)
setTypes
in interface TemplHack
types
- TypeTreepublic void set(int idx, T value)
idx
- Indexvalue
- Valuepublic T get(int idx)
idx
- Index
public java.lang.String toString()
toString
in class java.lang.Object
public void read(SerialIn in) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
read
in interface Writable
in
- Stream to read from
java.io.IOException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public void read(SerialIn in, int len) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
in
- Stream to read fromlen
- Length
java.io.IOException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public void write(SerialOut out) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, CTLException
write
in interface Writable
out
- Stream to write to
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
CTLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |