Back to index

im-sdk  12.3.91
Public Types | Public Member Functions | Private Member Functions | Private Attributes
IMObjectWithDesc Class Reference

#include <IMBasicObject.hh>

Inheritance diagram for IMObjectWithDesc:
Inheritance graph
[legend]
Collaboration diagram for IMObjectWithDesc:
Collaboration graph
[legend]

List of all members.

Public Types

enum  OBJTYPE {
  UNKNOWN, OPERATION = 1, NUMBER_VARIABLE = 2, BOOL_VARIABLE = 3,
  CHAR_VARIABLE = 4, MTEXT_VARIABLE = 5, EVENT_VARIABLE = 6, NUMBER_PROPERTY = 0x12,
  BOOL_PROPERTY = 0x13, CHAR_PROPERTY = 0x14, MTEXT_PROPERTY = 0x15, EVENT_PROPERTY = 0x16,
  DOWNLOADABLE_OBJ_MASK = 0x80, EIMIL_CONFIG = 0x81, IMDESCRIPTOR = 0x82, BINARY_GUI = 0x83,
  BINARY_LWE = 0x84, JAVA_GUI = 0x85, JAVA_LWE = 0x86, SCRIPT_GUI = 0x87,
  SCRIPT_LWE = 0x88
}
enum  OBJCATEGORY {
  UNKNOWN_OBJECT = -1, GUI_OBJECT = 0, LWE_OBJECT = 1, SYNTAX_RULE_OBJECT = 2,
  IM_MANAGER_RULE_OBJECT = 3, PRELOADING_LWE_OBJECT = 4
}

Public Member Functions

int get_object_size () const
const u16stringget_domain () const
const u16stringget_hrn () const
const u16stringget_signature () const
const u16stringget_scope () const
const u16stringget_path () const
const list< u16string > & get_classes () const
virtual const CARD8BIT * get_binary_representation ()
void log_obj ()
 IMObjectWithDesc (const IMObjectDescriptorStruct &desc)
virtual ~IMObjectWithDesc ()
CARD16BIT get_attribid () const
CARD32BIT get_fullid () const
bool downloadablep () const
enum OBJTYPE get_type () const
enum OBJCATEGORY get_category () const

Private Member Functions

void set_size ()

Private Attributes

CARD8BIT * pbinrep
string leid
int size
list< u16stringjarfile_classes
u16string hrn
u16string domain
u16string path
u16string scope
u16string signature
u16string basepath
u16string encoding

Detailed Description

Definition at line 240 of file IMBasicObject.hh.


Member Enumeration Documentation

enum IMObject::OBJCATEGORY [inherited]
Enumerator:
UNKNOWN_OBJECT 
GUI_OBJECT 
LWE_OBJECT 
SYNTAX_RULE_OBJECT 
IM_MANAGER_RULE_OBJECT 
PRELOADING_LWE_OBJECT 

Definition at line 162 of file IMBasicObject.hh.

enum IMObject::OBJTYPE [inherited]
Enumerator:
UNKNOWN 
OPERATION 
NUMBER_VARIABLE 
BOOL_VARIABLE 
CHAR_VARIABLE 
MTEXT_VARIABLE 
EVENT_VARIABLE 
NUMBER_PROPERTY 
BOOL_PROPERTY 
CHAR_PROPERTY 
MTEXT_PROPERTY 
EVENT_PROPERTY 
DOWNLOADABLE_OBJ_MASK 
EIMIL_CONFIG 
IMDESCRIPTOR 
BINARY_GUI 
BINARY_LWE 
JAVA_GUI 
JAVA_LWE 
SCRIPT_GUI 
SCRIPT_LWE 

Definition at line 135 of file IMBasicObject.hh.


Constructor & Destructor Documentation

Definition at line 240 of file IMBasicObject.cpp.

  : IMObject(convert_od_type(desc.type), true)
{
    pbinrep = NULL;
    leid = desc.leid;
    size = desc.size;

    for (unsigned int i = 0; i < desc.count_names; i++) {
       jarfile_classes.push_back(u16string(desc.class_names[i]));
    }
    if (desc.name_length > 0) hrn = u16string(desc.name, desc.name_length);
    if (desc.domain) domain = u16string(desc.domain);
    if (desc.path) path = u16string(desc.path);
    if (desc.scope) scope = u16string(desc.scope);
    if (desc.signature) signature = u16string(desc.signature);
    if (desc.basepath) basepath = u16string(desc.basepath);
    if (desc.encoding) encoding = u16string(desc.encoding);

    set_size();
}

Here is the call graph for this function:

Definition at line 262 of file IMBasicObject.cpp.

{
    if (pbinrep) free(pbinrep);
}

Member Function Documentation

bool IMObject::downloadablep ( ) const [inline, inherited]

Definition at line 186 of file IMBasicObject.hh.

    { return downloadable; }

Here is the caller graph for this function:

CARD16BIT IMObject::get_attribid ( ) const [inline, inherited]

Definition at line 179 of file IMBasicObject.hh.

    {
       if (!downloadablep()) return 0;
       return ((id & ((1 << 15) - 1)) | (1 << 15));
    }

Here is the call graph for this function:

Here is the caller graph for this function:

const CARD8BIT * IMObjectWithDesc::get_binary_representation ( ) [virtual]

Definition at line 184 of file IMBasicObject.cpp.

{
    enum OBJTYPE retval;

    if (pbinrep) return pbinrep;
    retval = get_type();
    if (retval == IMObject::JAVA_GUI || retval == IMObject::JAVA_LWE) {
       if (size > 0) {
          if (!path.get_charstr()) return NULL;
          pbinrep = IM_read_file(path.get_charstr(), size);
          return pbinrep;
       }
    }
    return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

enum IMObject::OBJCATEGORY IMObject::get_category ( ) const [inherited]

Definition at line 14 of file IMBasicObject.cpp.

{
    enum OBJTYPE retval;

    retval = get_type();
    if (retval == EIMIL_CONFIG) {
       return SYNTAX_RULE_OBJECT;
    } else if (retval == JAVA_GUI ||
              retval == BINARY_GUI ||
              retval == SCRIPT_GUI) {
       return GUI_OBJECT;
    } else if (retval == BINARY_LWE ||
              retval == JAVA_LWE ||
              retval == SCRIPT_LWE) {
       return LWE_OBJECT;
    } else if (retval == UNKNOWN ||
              retval == IMDESCRIPTOR ||
              retval == OPERATION ||
              retval == NUMBER_VARIABLE ||
              retval == BOOL_VARIABLE ||
              retval == CHAR_VARIABLE ||
              retval == MTEXT_VARIABLE ||
              retval == EVENT_VARIABLE ||
              retval == NUMBER_PROPERTY ||
              retval == BOOL_PROPERTY ||
              retval == CHAR_PROPERTY ||
              retval == MTEXT_PROPERTY ||
              retval == EVENT_PROPERTY) {
       return UNKNOWN_OBJECT;
    } else {
       ERROR_INTERNAL("Invalid object type.");
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

const list<u16string>& IMObjectWithDesc::get_classes ( ) const [inline]

Definition at line 269 of file IMBasicObject.hh.

    { return jarfile_classes; }

Here is the caller graph for this function:

const u16string& IMObjectWithDesc::get_domain ( ) const [inline]

Definition at line 259 of file IMBasicObject.hh.

    { return domain; }

Here is the caller graph for this function:

CARD32BIT IMObject::get_fullid ( ) const [inline, inherited]

Definition at line 184 of file IMBasicObject.hh.

    { return id; }
const u16string& IMObjectWithDesc::get_hrn ( ) const [inline]

Definition at line 261 of file IMBasicObject.hh.

    { return hrn; }

Here is the caller graph for this function:

int IMObjectWithDesc::get_object_size ( ) const [inline]

Definition at line 257 of file IMBasicObject.hh.

    { return size; }

Here is the caller graph for this function:

const u16string& IMObjectWithDesc::get_path ( ) const [inline]

Definition at line 267 of file IMBasicObject.hh.

    { return path; }

Here is the caller graph for this function:

const u16string& IMObjectWithDesc::get_scope ( ) const [inline]

Definition at line 265 of file IMBasicObject.hh.

    { return scope; }

Here is the caller graph for this function:

const u16string& IMObjectWithDesc::get_signature ( ) const [inline]

Definition at line 263 of file IMBasicObject.hh.

    { return signature; }

Here is the caller graph for this function:

enum OBJTYPE IMObject::get_type ( ) const [inline, inherited]

Definition at line 188 of file IMBasicObject.hh.

    { return type; }

Here is the caller graph for this function:

Definition at line 148 of file IMBasicObject.cpp.

{
    const char none[] = "NONE";
    if (IMLog::get_instance()->check(IMLog::DEBUGLOG)) {
       LOG_DEBUG("object for %s\n"
                "    object_type      = %d\n"
                "    object id        = %d\n"
                "    object size      = %d\n"
                "    rev. domain name = %s\n"
                "    path             = %s\n"
                "    scope            = %s\n"
                "    signature        = %s\n"
                "    basepath         = %s\n"
                "    encoding         = %s",
                leid.c_str(),
                (int) get_type(),
                (int) get_attribid(),
                size,
                domain.get_charstr() ? domain.get_charstr() : none,
                path.get_charstr() ? path.get_charstr() : none,
                scope.get_charstr() ? scope.get_charstr() : none,
                signature.get_charstr() ? signature.get_charstr() : none,
                basepath.get_charstr() ? basepath.get_charstr() : none,
                encoding.get_charstr() ? encoding.get_charstr() : none
       );
       list<u16string>::iterator it;
       for (it = jarfile_classes.begin();
            it != jarfile_classes.end();
            it++) {
           LOG_DEBUG("    jarfile class    = %s",
                    it->get_charstr() ? it->get_charstr() : "Invalid");
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void IMObjectWithDesc::set_size ( ) [private]

Definition at line 201 of file IMBasicObject.cpp.

{
    enum OBJTYPE retval;

    retval = get_type();
    if (retval == IMObject::JAVA_GUI || retval == IMObject::JAVA_LWE) {
       int tsize;
       if (!path.get_charstr())
           return;
       tsize = IM_file_size(path.get_charstr());
       if (tsize > 0)
           size = tsize;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 251 of file IMBasicObject.hh.

Definition at line 247 of file IMBasicObject.hh.

Definition at line 252 of file IMBasicObject.hh.

Definition at line 246 of file IMBasicObject.hh.

Definition at line 245 of file IMBasicObject.hh.

string IMObjectWithDesc::leid [private]

Definition at line 243 of file IMBasicObject.hh.

Definition at line 248 of file IMBasicObject.hh.

CARD8BIT* IMObjectWithDesc::pbinrep [private]

Definition at line 242 of file IMBasicObject.hh.

Definition at line 249 of file IMBasicObject.hh.

Definition at line 250 of file IMBasicObject.hh.

int IMObjectWithDesc::size [private]

Definition at line 244 of file IMBasicObject.hh.


The documentation for this class was generated from the following files: