org.openorb.compiler.object
Class IdlObject

java.lang.Object
  extended byorg.openorb.compiler.object.IdlObject
All Implemented Interfaces:
idlObject, java.io.Serializable
Direct Known Subclasses:
IdlArray, IdlAttribute, IdlConst, IdlContext, IdlEnum, IdlEnumMember, IdlExcept, IdlFactory, IdlFactoryMember, IdlFixed, IdlIdent, IdlImport, IdlInclude, IdlInterface, IdlModule, IdlNative, IdlOp, IdlParam, IdlRaises, IdlRoot, IdlSequence, IdlSimple, IdlStateMember, IdlString, IdlStruct, IdlStructMember, IdlTypeDef, IdlUnion, IdlUnionMember, IdlValue, IdlValueBox, IdlValueInheritance, IdlWString

public class IdlObject
extends java.lang.Object
implements java.io.Serializable, idlObject

Cette classe represente la representation generique d'une donnee de l'IDL

Version:
$Revision: 1.3 $ $Date: 2001/02/28 21:51:13 $
Author:
Jerome Daniel <daniel@intalio.com>
See Also:
Serialized Form

Field Summary
static boolean _case_sensitive
          Indique si la comparaison s'effectue avec un mode case sensitive
 IdlComment _comment
          Commentaire associe a cet object
 int _current
          Position courante dans le parcours de la liste des sous-objets
 boolean _diese
          Implique la mise entre #ifndef ...
 boolean _has_inheritance
          Must be set to true if this object can have inheritance
 java.lang.String _id
          L'Id de l'objet
 boolean _import
          Flag qui precise si l'objet est importe
 boolean _is_container
          Must be set to true if this object is a container
 java.util.Vector _list
          Liste des sous objets
 boolean _map
          Indique si l'objet a ete defini dans un fichier inclus
 java.lang.String _name
          Nom de l'objet
 java.lang.Object _opaque
          Reference vers une donnee opaque
 java.lang.String _prefix
          Prefixe de cet objet CORBA
 boolean _prefix_explicit
          Is TypeId used for this object ?
 int _type
          Precise le type d'objet IDL
 boolean _underscore
          Y a t'il un underscore
 IdlObject _upper
          Precise l'objet pere
static boolean adaptName
          This flag is used to set if name must be adapt ( '_' is removed )
 boolean flag
          Un flag impose par Nicolas
static java.lang.String idlPrefix
          Prefixe des IDs d'objets CORBA
 
Constructor Summary
IdlObject(int type, IdlObject father)
          Construit un objet de description IDL
 
Method Summary
 java.lang.String adaptName(java.lang.String name)
           
 void addIdlObject(IdlObject obj)
          Ajoute un objet supplementaire comme contenu de cet objet
 void applyPrefix(java.lang.String prefix)
          Apply a prefix
 void attach_comment()
          Attache un commentaire a cet object
 void attach_comment(IdlComment comment)
          Attache un commentaire a cet object
 void changePrefix(java.lang.String prefix)
          Change prefix to my self but also to all contained objects
 boolean contains(int type)
          Permet de tester la possession d'un type dans un autre
 boolean containsObject(int type)
          Return TRUE if this object contains a object type
 java.util.Enumeration content()
          Return this idlObject content
 IdlObject current()
          Retourne l'objet courant de la liste des sous-objets
 boolean end()
          Retourve Vrai dans le cas ou l'on a atteint la fin de la liste des sous-objets
 java.util.Enumeration filter(int type)
          Return this idlObject content with a filter
 int final_kind()
          Retourne le type final de cet object IDL
 IdlObject final_object()
          Retourne l'objet final de cet object IDL
 IdlComment getComment()
          Retourne le commantaire associe a cet object
 java.lang.String getId()
          Retourne l'ID d'un objet
 java.lang.String[] getIdComponents()
          Return the components of the ID
 java.lang.String getPrefix()
          Retourne le prefixe de cet objet
 int getPrefixDeepth()
          Return the prefix deepth
 boolean hasComment()
          Retourne vrai si l'objet a un commentaire
 int idlConcreteType()
          Return the concrete type ( if IDENTIFIER or TYPEDEF then returns the associated idl object )
 idlObject idlDefinedIn()
          Return the defined in object
 int idlFinalType()
          Return the final type ( if IDENTIFIER then returns the associated idl object )
 java.lang.String idlID()
          Return the IDL ID
 java.lang.String idlName()
          Return the object name
 int idlType()
          Return the object type
 boolean included()
          Indique si l'objet courant est defini dans un fichier inclus
 void insertIdlObject(IdlObject obj, int idx)
          Insert un element
 boolean into(int type)
          Permet de tester l'inclusion d'un type dans un autre
 boolean isDefined(java.lang.String name, boolean scoped)
          Retourne VRAI si l'identificateur passe est deja utilise pour un autre symbole.
 boolean isSame(java.lang.String name)
          This method returns true if this object is the same as the given name.
 boolean isVisible(java.lang.String name_, boolean scoped)
          Retourne VRAI si l'identificateur passe est deja utilise pour un autre symbole.
 int kind()
          Retourne le type de l'objet IDL
 int length()
          Retourne le nombre de sous-objets
 IdlObject myScope(java.lang.String scope_name, int level)
          Retourne le scope d'un objet
 java.lang.String name()
          Retourne le nom de l'objet
 void name(java.lang.String s)
          Fixe le nom de l'objet
 java.util.Vector nameToSequence(java.lang.String name)
          Permet de passer un identificateur en une sequence d'identificateur simple.
 void next()
          Passe a la position suivante dans la liste des sous-objets
 java.lang.Object opaque()
          Retourne la donnee opaque
 void opaque(java.lang.Object op)
          Fixe la donnee opaque
 int pos()
          Retourne la position courante dans la liste des sous-objets
 void pos(int p)
          Fixe la position courante dans la liste des sous-objets
 void refreshIncluded()
          Recalcul si l'objet courant est defini dans un fichier inclus
 void reset()
          Initialise la position courante de la liste des sous-objets
 IdlObject returnInheritedObject(java.lang.String name)
          This method returns an inherited object
 IdlObject returnObject(java.lang.String name_, boolean scoped)
          Cette methode retourne l'objet demande en fonction de son nom.
 IdlObject returnVisibleObject(java.lang.String name_, boolean scoped)
          Cette methode retourne l'objet demande en fonction de son nom.
 IdlRoot root()
          Retourne l'objet root
 IdlObject sameAs(java.lang.String name)
          Return the equivalent object for the given name
 IdlObject search(java.util.Vector seq, boolean scoped)
          Recherche un symbole au moyen du chemin defini sous forme d'une sequence
 IdlObject searchObject(java.lang.String name)
          This method returns an contained object
 void sensitive(boolean s)
          Permet de fixer le fait d'un case sensitive
 void setId(java.lang.String id)
          Fixe l'ID d'un objet
 IdlObject switchFinalObject(IdlObject obj)
          Retourne l'objet correspondant au type du switch dans le cas d'une union.
 IdlObject type()
          Retourne le type du membre
 void type(IdlObject tp)
          Fixe le type du membre
 IdlObject upper()
          Retourne l'objet pere
 boolean use_diese()
          Retourne si une section #ifndef est a utiliser
 void use_diese(boolean s)
          Permet de fixer le fait de l'utilisation de #ifndef
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_type

public int _type
Precise le type d'objet IDL


flag

public boolean flag
Un flag impose par Nicolas


_upper

public IdlObject _upper
Precise l'objet pere


adaptName

public static boolean adaptName
This flag is used to set if name must be adapt ( '_' is removed )


idlPrefix

public static java.lang.String idlPrefix
Prefixe des IDs d'objets CORBA


_prefix

public java.lang.String _prefix
Prefixe de cet objet CORBA


_name

public java.lang.String _name
Nom de l'objet


_id

public java.lang.String _id
L'Id de l'objet


_list

public java.util.Vector _list
Liste des sous objets


_current

public int _current
Position courante dans le parcours de la liste des sous-objets


_map

public boolean _map
Indique si l'objet a ete defini dans un fichier inclus


_comment

public IdlComment _comment
Commentaire associe a cet object


_diese

public boolean _diese
Implique la mise entre #ifndef ... du symbole


_case_sensitive

public static boolean _case_sensitive
Indique si la comparaison s'effectue avec un mode case sensitive


_opaque

public java.lang.Object _opaque
Reference vers une donnee opaque


_import

public boolean _import
Flag qui precise si l'objet est importe


_underscore

public boolean _underscore
Y a t'il un underscore


_prefix_explicit

public boolean _prefix_explicit
Is TypeId used for this object ?


_has_inheritance

public boolean _has_inheritance
Must be set to true if this object can have inheritance


_is_container

public boolean _is_container
Must be set to true if this object is a container

Constructor Detail

IdlObject

public IdlObject(int type,
                 IdlObject father)
Construit un objet de description IDL

Parameters:
type - precise le type d'objet IDL
father - indique l'objet pere
Method Detail

switchFinalObject

public IdlObject switchFinalObject(IdlObject obj)
Retourne l'objet correspondant au type du switch dans le cas d'une union.

Returns:
l'objet du switch

name

public void name(java.lang.String s)
Fixe le nom de l'objet


name

public java.lang.String name()
Retourne le nom de l'objet


upper

public IdlObject upper()
Retourne l'objet pere


kind

public int kind()
Retourne le type de l'objet IDL


final_kind

public int final_kind()
Retourne le type final de cet object IDL


final_object

public IdlObject final_object()
Retourne l'objet final de cet object IDL


getPrefix

public java.lang.String getPrefix()
Retourne le prefixe de cet objet


setId

public void setId(java.lang.String id)
Fixe l'ID d'un objet


getPrefixDeepth

public int getPrefixDeepth()
Return the prefix deepth


getIdComponents

public java.lang.String[] getIdComponents()
Return the components of the ID


getId

public java.lang.String getId()
Retourne l'ID d'un objet


pos

public int pos()
Retourne la position courante dans la liste des sous-objets

Returns:
la position courante

pos

public void pos(int p)
Fixe la position courante dans la liste des sous-objets

Parameters:
p - la position courante

reset

public void reset()
Initialise la position courante de la liste des sous-objets


end

public boolean end()
Retourve Vrai dans le cas ou l'on a atteint la fin de la liste des sous-objets

Returns:
VRAI si le parcours est fini

length

public int length()
Retourne le nombre de sous-objets

Returns:
le nombre de sous objets

current

public IdlObject current()
Retourne l'objet courant de la liste des sous-objets

Returns:
l'objet courant

next

public void next()
Passe a la position suivante dans la liste des sous-objets


included

public boolean included()
Indique si l'objet courant est defini dans un fichier inclus

Specified by:
included in interface idlObject
Returns:
VRAI si l'objet est inclus

refreshIncluded

public void refreshIncluded()
Recalcul si l'objet courant est defini dans un fichier inclus


nameToSequence

public java.util.Vector nameToSequence(java.lang.String name)
Permet de passer un identificateur en une sequence d'identificateur simple. Par exemple : toto::titi en [ toto ] [ titi ]

Returns:
un vecteur qui contient la liste des identificateurs

search

public IdlObject search(java.util.Vector seq,
                        boolean scoped)
Recherche un symbole au moyen du chemin defini sous forme d'une sequence

Returns:
l'objet trouve

myScope

public IdlObject myScope(java.lang.String scope_name,
                         int level)
Retourne le scope d'un objet


isVisible

public boolean isVisible(java.lang.String name_,
                         boolean scoped)
Retourne VRAI si l'identificateur passe est deja utilise pour un autre symbole.

Parameters:
scoped - mettre a vrai si l'on restraint la recherche au scope de l'objet
Returns:
retourne VRAI si l'identificateur est deja utilise

returnVisibleObject

public IdlObject returnVisibleObject(java.lang.String name_,
                                     boolean scoped)
Cette methode retourne l'objet demande en fonction de son nom.

Parameters:
scoped - mettre a vrai si l'on restraint la recherche au scope de l'objet
Returns:
l'objet demande

isDefined

public boolean isDefined(java.lang.String name,
                         boolean scoped)
Retourne VRAI si l'identificateur passe est deja utilise pour un autre symbole.

Parameters:
name - le nom a verifier
scoped - mettre a vrai si l'on restraint la recherche au scope de l'objet
Returns:
retourne VRAI si l'identificateur est deja utilise

returnObject

public IdlObject returnObject(java.lang.String name_,
                              boolean scoped)
Cette methode retourne l'objet demande en fonction de son nom.

Parameters:
scoped - mettre a vrai si l'on restraint la recherche au scope de l'objet
Returns:
l'objet demande

addIdlObject

public void addIdlObject(IdlObject obj)
Ajoute un objet supplementaire comme contenu de cet objet


insertIdlObject

public void insertIdlObject(IdlObject obj,
                            int idx)
Insert un element


root

public IdlRoot root()
Retourne l'objet root


into

public boolean into(int type)
Permet de tester l'inclusion d'un type dans un autre

Parameters:
type - Le type conteneur
Returns:
true si l'objet est inclus dans le conteneur specifie

contains

public boolean contains(int type)
Permet de tester la possession d'un type dans un autre

Parameters:
type - Le type conteneur
Returns:
true si l'objet est inclus dans le conteneur specifie

type

public IdlObject type()
Retourne le type du membre

Returns:
le type

type

public void type(IdlObject tp)
Fixe le type du membre

Parameters:
tp - le type

attach_comment

public void attach_comment()
Attache un commentaire a cet object


attach_comment

public void attach_comment(IdlComment comment)
Attache un commentaire a cet object


getComment

public IdlComment getComment()
Retourne le commantaire associe a cet object


hasComment

public boolean hasComment()
Retourne vrai si l'objet a un commentaire


sensitive

public void sensitive(boolean s)
Permet de fixer le fait d'un case sensitive


use_diese

public void use_diese(boolean s)
Permet de fixer le fait de l'utilisation de #ifndef


use_diese

public boolean use_diese()
Retourne si une section #ifndef est a utiliser


opaque

public void opaque(java.lang.Object op)
Fixe la donnee opaque


opaque

public java.lang.Object opaque()
Retourne la donnee opaque


applyPrefix

public void applyPrefix(java.lang.String prefix)
Apply a prefix


changePrefix

public void changePrefix(java.lang.String prefix)
Change prefix to my self but also to all contained objects


returnInheritedObject

public IdlObject returnInheritedObject(java.lang.String name)
This method returns an inherited object


isSame

public boolean isSame(java.lang.String name)
This method returns true if this object is the same as the given name.


sameAs

public IdlObject sameAs(java.lang.String name)
Return the equivalent object for the given name


searchObject

public IdlObject searchObject(java.lang.String name)
This method returns an contained object


adaptName

public java.lang.String adaptName(java.lang.String name)

idlName

public java.lang.String idlName()
Description copied from interface: idlObject
Return the object name

Specified by:
idlName in interface idlObject

idlID

public java.lang.String idlID()
Description copied from interface: idlObject
Return the IDL ID

Specified by:
idlID in interface idlObject

idlDefinedIn

public idlObject idlDefinedIn()
Description copied from interface: idlObject
Return the defined in object

Specified by:
idlDefinedIn in interface idlObject

idlType

public int idlType()
Description copied from interface: idlObject
Return the object type

Specified by:
idlType in interface idlObject

content

public java.util.Enumeration content()
Description copied from interface: idlObject
Return this idlObject content

Specified by:
content in interface idlObject

filter

public java.util.Enumeration filter(int type)
Description copied from interface: idlObject
Return this idlObject content with a filter

Specified by:
filter in interface idlObject

containsObject

public boolean containsObject(int type)
Description copied from interface: idlObject
Return TRUE if this object contains a object type

Specified by:
containsObject in interface idlObject

idlFinalType

public int idlFinalType()
Description copied from interface: idlObject
Return the final type ( if IDENTIFIER then returns the associated idl object )

Specified by:
idlFinalType in interface idlObject

idlConcreteType

public int idlConcreteType()
Description copied from interface: idlObject
Return the concrete type ( if IDENTIFIER or TYPEDEF then returns the associated idl object )

Specified by:
idlConcreteType in interface idlObject