コード例 #1
0
logical sBase_SharedData :: InitKey (char *prop_path, char *extnames )
{
  PropertyHandle    *ph        = GetPropertyHandle();
  PropertyHandle    *kennung   = ph->GPH("kennung");
  PropertyHandle    *id        = ph->GPH(prop_path);
  char               idkey[16];
BEGINSEQ
  if ( kennung->IsEmpty() )
    kennung->SetValue(::GetEigentuemerKennung(),NO);
    
  if ( extnames && id->IsEmpty() )
  {
    id->SetValue(1,NO);  

    PropertyHandle    all(ph->GetObjectHandle(),extnames,PI_Read);
                                                    SDBCERR
    all.SetOrder("ik_kennung");
    memset(idkey,0,sizeof(idkey));
    *idkey = *kennung->GetString();
    if ( !all.LocateKey(Key(idkey)) )
      all.Position(-1);
    else
      all.Get(LAST_INSTANCE);
    if ( all.IsPositioned() )
      if ( *all.GPH("kennung") == *kennung )
        id->SetValue(all.GPH(prop_path)->GetInt()+1,NO);  
  }

RECOVER

ENDSEQ
  return(NO);
}
コード例 #2
0
char *pc_ODC_Variable :: DataTypeCString (NString &nstring )
{
  PropertyHandle   *ddetype   = GPH("ddetype");
  char             *save_type = NULL;
  logical           term      = NO;
BEGINSEQ
  if ( GPH("const_val")->IsTrue() )
  {
    nstring += "const";
    nstring.Append(' ');
  }

  if ( TestSysVariable("C_INTERFACE","Y") )
  {
    PropertyHandle   inst_coll(GetDBHandle(),"InstCollection",PI_Read);
                                                    SDBCERR
	PropertyHandle phCInterface("CInterface");
    if ( !inst_coll(phCInterface) ) SDBERR(99)

    if ( inst_coll.GPH("collection")->Get(*ddetype) )
    {
      save_type = strdup(ddetype->GetString());
      ddetype->SetValue("void",NO);
    }
  }