gridlabd::GClass Class Reference

List of all members.


Detailed Description

The primary representation of the GridLAB-D CLASS struct in Java.

Includes native hooks for calls in the GridLAB-D core that pertain to the CLASS structures.

Author:
Matthew Hauer <matthew.hauer@pnl.gov>

Definition at line 12 of file GClass.java.


Public Member Functions

GProperty AddProperty (String pname, String ptype)
 Adds a property to a GClass, appends it to the property table, and increases the estimated size of the class objects.
GProperty findProperty (String pname)
 Retrieves a property by name from the GClass's property table.
boolean hasObject (Long addr)
 Checks to see if a particular OBJECT * has a corresponding GObject in this GClass's object table.
void PutObj (GObject obj)
 Adds an object to this GClass's HashTable of instantiated objects.

Static Public Member Functions

static GClass BuildClass (String classname, GModule mod, int sync)
 public static GClass BuildClass(String classname, GModule module, int sync) Registers a classname with a core module and adds the new class object to the GModule.

Member Function Documentation

GProperty gridlabd::GClass::AddProperty ( String  pname,
String  ptype 
) [inline]

Adds a property to a GClass, appends it to the property table, and increases the estimated size of the class objects.

Will not add a property if the class is in use.

Parameters:
pname Name of the property to add.
ptype Name of the propety type to add (see GridlabD.proptype)
Returns:
Null if the class is in use, if the property already exists for this class, or if an error occurs. Returns the new GProperty on success.

Definition at line 97 of file GClass.java.

static GClass gridlabd::GClass::BuildClass ( String  classname,
GModule  mod,
int  sync 
) [inline, static]

public static GClass BuildClass(String classname, GModule module, int sync) Registers a classname with a core module and adds the new class object to the GModule.

Parameters:
classname The name of the class to publish
mod The GModule object that is registering the class
sync The pass configuration for this class
Returns:
New GClass on success, null on failure.

Definition at line 40 of file GClass.java.

References gridlabd::GModule::AddClass(), and gridlabd::GModule::GetAddr().

GProperty gridlabd::GClass::findProperty ( String  pname  )  [inline]

Retrieves a property by name from the GClass's property table.

Parameters:
pname The property name.
Returns:
The GProperty if it is found, null otherwise.

Definition at line 74 of file GClass.java.

boolean gridlabd::GClass::hasObject ( Long  addr  )  [inline]

Checks to see if a particular OBJECT * has a corresponding GObject in this GClass's object table.

Parameters:
addr The address of the OBJECT structure in the core.
Returns:
True if the pointer references an object of this class.

Definition at line 83 of file GClass.java.

void gridlabd::GClass::PutObj ( GObject  obj  )  [inline]

Adds an object to this GClass's HashTable of instantiated objects.

Parameters:
obj The GObject to add to the object table.

Definition at line 54 of file GClass.java.

References gridlabd::GObject::GetAddr().

Referenced by gridlabd::GObject::BuildSingle().


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

GridLAB-DTM Version 2.0
An open-source project initiated by the US Department of Energy