Ignore:
Timestamp:
Dec 1, 2006, 6:12:24 PM (19 years ago)
Author:
cinc
Message:

Added methods to NOMString and NOMPath classes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/foundation/class_c/nomstring.c

    r122 r129  
    6262}
    6363
    64 /* Returns the C string held by this NOMString*/
     64/* Returns the C string held by this NOMString */
    6565NOM_Scope CORBA_string NOMLINK impl_NOMString_getCString(NOMString* nomSelf, CORBA_Environment *ev)
    6666{
     
    104104}
    105105
     106NOM_Scope CORBA_unsigned_long NOMLINK impl_NOMString_length(NOMString* nomSelf, CORBA_Environment *ev)
     107{
     108  NOMStringData* nomThis=NOMStringGetData(nomSelf);
     109
     110  return _gString->len;
     111}
     112
     113NOM_Scope PNOMString NOMLINK impl_NOMString_truncateString(NOMString* nomSelf, const CORBA_unsigned_long ulNewLen,
     114                                                           CORBA_Environment *ev)
     115{
     116  NOMStringData* nomThis=NOMStringGetData(nomSelf);
     117
     118  g_string_truncate(_gString, ulNewLen);
     119
     120  return nomSelf;
     121}
     122
     123
    106124NOM_Scope void NOMLINK impl_NOMString_nomInit(NOMString* nomSelf, CORBA_Environment *ev)
    107125{
     
    110128  NOMString_nomInit_parent((NOMObject*)nomSelf,  ev);
    111129
    112   /* Alloc an empty GString */
    113   _gString=g_string_new(NULL);
     130  /* Alloc a zero length GString */
     131  _gString=g_string_new("");
    114132}
    115133
Note: See TracChangeset for help on using the changeset viewer.