本文整理汇总了Java中org.omg.CORBA.TypeCodePackage.Bounds类的典型用法代码示例。如果您正苦于以下问题:Java Bounds类的具体用法?Java Bounds怎么用?Java Bounds使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Bounds类属于org.omg.CORBA.TypeCodePackage包,在下文中一共展示了Bounds类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: member_name
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
public String member_name()
throws org.omg.DynamicAny.DynAnyPackage.InvalidValue
{
if (m_destroyed)
throw new org.omg.CORBA.OBJECT_NOT_EXIST("DynAny destroyed.");
if (m_component_count == 1)
throw new InvalidValue("No active member");
try {
return m_base_type.member_name(m_active_member_index);
}
catch (BadKind bk) {
throw new BAD_TYPECODE(bk.toString());
}
catch (Bounds bd) {
throw new INTERNAL(bd.toString());
}
}
示例2: member_kind
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
public org.omg.CORBA.TCKind member_kind()
throws org.omg.DynamicAny.DynAnyPackage.InvalidValue
{
if (m_destroyed)
throw new org.omg.CORBA.OBJECT_NOT_EXIST("DynAny destroyed.");
if (m_active_member_index < 1)
throw new InvalidValue("No member selected.");
try {
return m_base_type.member_type(m_active_member_index).kind();
}
catch (BadKind bk) { /* unreachable */
return null;
}
catch (Bounds bd) { /* unreachable */
return null;
}
}
示例3: current_member_name
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
public String current_member_name()
throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
org.omg.DynamicAny.DynAnyPackage.InvalidValue
{
if (m_destroyed)
throw new OBJECT_NOT_EXIST("DynAny destroyed.");
if (m_current_index == -1)
throw new InvalidValue("No member (current = -1)");
// at this point alwais curremt_member is valid
try {
return m_base_type.member_name(m_current_index);
}
catch (BadKind bk) {
/* unreachable */
throw new BAD_TYPECODE();
}
catch (Bounds bd) {
/* unreachable */
throw new INTERNAL(bd.toString());
}
}
示例4: current_member_kind
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
public org.omg.CORBA.TCKind current_member_kind()
throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
org.omg.DynamicAny.DynAnyPackage.InvalidValue
{
if (m_destroyed)
throw new OBJECT_NOT_EXIST("DynAny destroyed.");
if (m_current_index == -1)
throw new InvalidValue("No member (current = -1)");
try {
return m_base_type.member_type(m_current_index).kind();
}
catch (BadKind bk) {
/* unreachable */
throw new TypeMismatch(bk.toString());
}
catch (Bounds bd) {
/* unreachable */
throw new TypeMismatch(bd.toString());
}
}
示例5: set_as_string
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
public void set_as_string(String value)
throws org.omg.DynamicAny.DynAnyPackage.InvalidValue
{
if (m_destroyed)
throw new org.omg.CORBA.OBJECT_NOT_EXIST("DynAny destroyed.");
try {
int num_values = m_base_type.member_count();
for (int i = 0; i < num_values; i++) {
if (value.equals(type().member_name(i))) {
m_enum_value = i;
return;
}
}
throw new InvalidValue("No member named " + value + ".");
}
catch (Bounds bd) { /* unreachable */
}
catch (BadKind bk) { /* unreachable */
}
}
示例6: skipValue
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
public static boolean skipValue(TypeCode type, CDRInputStream input)
{
try {
int member_length = type.member_count();
for (int i = 0; i < member_length; i++) {
if (!TypeCodeMarshaler.skipValue(type.member_type(i), input))
return false;
}
}
catch (BadKind bk) {
throw new BAD_TYPECODE("Fault in value operations:"
+ bk.toString());
}
catch (Bounds bds) {
throw new BAD_TYPECODE("Fault in value operations:"
+ bds.toString());
}
return true;
}
示例7: remarshalValue
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
/**
* Copies and remarshals the given typecode value marshaled in an
* InputStream to a <code>es.tid.TIDorbj.core.CDRInputStream</code>. This
* method will alwais be invoked by this stream.
*
* @param type
* the value <code>TypeCode</code>
* @param input
* the <code>InputStream</code> where the value is marshaled
* @param output
* the <code>es.tid.TIDorbj.core.CDRInputStream</code>
* @pre the <code>TypeCode</code> must be an alias type
*/
public static void remarshalValue(org.omg.CORBA.TypeCode type,
InputStream input, CDROutputStream output)
{
try {
int member_length = type.member_count();
for (int i = 0; i < member_length; i++)
TypeCodeMarshaler.remarshalValue(type.member_type(i), input,
output);
}
catch (BadKind bk) {
throw new BAD_TYPECODE("Fault in value operations:"
+ bk.toString());
}
catch (Bounds bds) {
throw new BAD_TYPECODE("Fault in value operations:"
+ bds.toString());
}
}
示例8: valuesEqual
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
/**
* Compares two InputStream marshaled values of a given TypeCode to a
* <code>es.tid.TIDorbj.core.CDRInputStream</code>. This method will
* alwais be invoked by this stream.
*
* @param type
* the value <code>TypeCode</code>
* @param input_a
* the <code>InputStream</code> where one value is marshaled
* @param input_b
* the <code>InputStream</code> where the value value is
* marshaled
* @pre <code>type</code> must be a value type.
*/
public static boolean valuesEqual(org.omg.CORBA.TypeCode type,
InputStream input_a, InputStream input_b)
{
try {
int member_length = type.member_count();
for (int i = 0; i < member_length; i++)
if (!TypeCodeMarshaler.valuesEqual(type.member_type(i),
input_a, input_b))
return false;
}
catch (BadKind bk) {
throw new BAD_TYPECODE("Fault in struct operations:"
+ bk.toString());
}
catch (Bounds bds) {
throw new BAD_TYPECODE("Fault in struct operations:"
+ bds.toString());
}
return true;
}
示例9: skipValue
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
/**
* Skips the value asociated to the TypeCode. This operation is used by the
* TIDorb's Any implementation an the subclass <code>skip_value()</code>
* operations.
*
* @param input
* must be alwais a reference to a CDRInputStream object.
*/
public static boolean skipValue(TypeCode type, CDRInputStream input)
{
try {
int member_length = type.member_count();
for (int i = 0; i < member_length; i++) {
if (!TypeCodeMarshaler.skipValue(type.member_type(i), input))
return false;
}
}
catch (BadKind bk) {
throw new BAD_TYPECODE("Fault in struct operations:"
+ bk.toString());
}
catch (Bounds bds) {
throw new BAD_TYPECODE("Fault in struct operations:"
+ bds.toString());
}
return true;
}
示例10: writeParams
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
/**
* Marshal the given typecode params in a
* <code>es.tid.TIDorbj.core.CDRInputStream</code>. This method will
* alwais be invoked by this stream.
*
* @param type
* the <code>TypeCode</code>
* @param output
* the <code>es.tid.TIDorbj.core.CDRInputStream</code>
* @pre the the <code>TypeCode</code> must be a struct type
*/
public static void writeParams(TypeCode type, CDROutputStream output)
{
ComplexTypeCode.writeParams(type, output);
try {
int member_length = type.member_count();
output.write_ulong(member_length);
for (int i = 0; i < member_length; i++) {
output.write_string(type.member_name(i));
output.write_TypeCode(type.member_type(i));
}
}
catch (BadKind bk) {
throw new BAD_TYPECODE("Fault in struct operations:"
+ bk.toString());
}
catch (Bounds bds) {
throw new BAD_TYPECODE("Fault in struct operations:"
+ bds.toString());
}
}
示例11: remarshalValue
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
/**
* Copies and remarshals the given typecode value marshaled in an
* InputStream to a <code>es.tid.TIDorbj.core.CDRInputStream</code>. This
* method will alwais be invoked by this stream.
*
* @param type
* the value <code>TypeCode</code>
* @param input
* the <code>InputStream</code> where the value is marshaled
* @param output
* the <code>es.tid.TIDorbj.core.CDRInputStream</code>
* @pre the <code>TypeCode</code> must be a struct type
*/
public static void remarshalValue(TypeCode type, InputStream input,
OutputStream output)
{
try {
int member_length = type.member_count();
for (int i = 0; i < member_length; i++)
TypeCodeMarshaler.remarshalValue(type.member_type(i), input,
output);
}
catch (BadKind bk) {
throw new BAD_TYPECODE("Fault in struct operations:"
+ bk.toString());
}
catch (Bounds bds) {
throw new BAD_TYPECODE("Fault in struct operations:"
+ bds.toString());
}
}
示例12: valuesEqual
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
/**
* Compares two InputStream marshaled values of a given TypeCode to a
* <code>es.tid.TIDorbj.core.CDRInputStream</code>. This method will
* alwais be invoked by this stream.
*
* @param type
* the value <code>TypeCode</code>
* @param input_a
* the <code>InputStream</code> where one value is marshaled
* @param input_b
* the <code>InputStream</code> where the value value is
* marshaled
* @pre <code>type</code> must be a struct type.
*/
public static boolean valuesEqual(org.omg.CORBA.TypeCode type,
InputStream input_a, InputStream input_b)
{
try {
int member_length = type.member_count();
for (int i = 0; i < member_length; i++)
if (!TypeCodeMarshaler.valuesEqual(type.member_type(i),
input_a, input_b))
return false;
}
catch (BadKind bk) {
throw new BAD_TYPECODE("Fault in struct operations:"
+ bk.toString());
}
catch (Bounds bds) {
throw new BAD_TYPECODE("Fault in struct operations:"
+ bds.toString());
}
return true;
}
示例13: searchMemberIndex
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
public static int searchMemberIndex(TypeCode type,
org.omg.CORBA.Any discriminator)
{
try {
int length = type.member_count();
for (int i = 0; i < length; i++)
if (discriminator.equal(type.member_label(i)))
return i;
return type.default_index();
}
catch (BadKind bk) {
throw new BAD_TYPECODE("Fault in union operations:"
+ bk.toString());
}
catch (Bounds bds) {
throw new BAD_TYPECODE("Fault in union operations:"
+ bds.toString());
}
}
示例14: writeParams
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
/**
* Marshal the given typecode params in a
* <code>es.tid.TIDorbj.core.CDRInputStream</code>. This method will
* alwais be invoked by this stream.
*
* @param type
* the <code>TypeCode</code>
* @param output
* the <code>es.tid.TIDorbj.core.CDRInputStream</code>
* @pre the the <code>TypeCode</code> must be an enum type
*/
public static void writeParams(TypeCode type, CDROutputStream output)
{
ComplexTypeCode.writeParams(type, output);
try {
int length = type.member_count();
output.write_ulong(length);
for (int i = 0; i < length; i++)
output.write_string(type.member_name(i));
}
catch (BadKind bk) {
throw new BAD_TYPECODE("Fault in enum operations:"
+ bk.toString());
}
catch (Bounds bds) {
throw new BAD_TYPECODE("Fault in enum operations:"
+ bds.toString());
}
}
示例15: member_label
import org.omg.CORBA.TypeCodePackage.Bounds; //导入依赖的package包/类
/** {@inheritDoc} */
public Any member_label(int index)
throws BadKind, Bounds
{
Field f = getField(index);
if (f.label != null)
{
return f.label;
}
else
throw new BadKind();
}