openDAQ
Open data acquisition platform
IStructBuilder Struct Referenceabstract

Builder component of Struct objects. Contains setter methods to configure the Struct parameters, and a build method that builds the Struct object. More...

+ Inheritance diagram for IStructBuilder:
+ Collaboration diagram for IStructBuilder:

Detailed Description

Builder component of Struct objects. Contains setter methods to configure the Struct parameters, and a build method that builds the Struct object.

Public Member Functions

virtual ErrCode INTERFACE_FUNC build (IStruct **struct_)=0
 Builds and returns a Struct object using the currently set values of the Builder. More...
 
virtual ErrCode INTERFACE_FUNC getStructType (IStructType **type)=0
 Gets the Struct's type. More...
 
virtual ErrCode INTERFACE_FUNC getFieldNames (IList **names)=0
 Gets a list of all Struct field names. More...
 
virtual ErrCode INTERFACE_FUNC setFieldValues (IList *values)=0
 Gets a list of all Struct field values. More...
 
virtual ErrCode INTERFACE_FUNC getFieldValues (IList **values)=0
 Gets a list of all Struct field values. More...
 
virtual ErrCode INTERFACE_FUNC set (IString *name, IBaseObject *field)=0
 Sets the value of a field with the given name. More...
 
virtual ErrCode INTERFACE_FUNC get (IString *name, IBaseObject **field)=0
 Gets the value of a field with the given name. More...
 
virtual ErrCode INTERFACE_FUNC hasField (IString *name, Bool *contains)=0
 Checks whether a field with the given name exists in the Struct. More...
 
virtual ErrCode INTERFACE_FUNC getAsDictionary (IDict **dictionary)=0
 Gets the field names and values of the Struct as a Dictionary. More...
 
- Public Member Functions inherited from IBaseObject
virtual ErrCode INTERFACE_FUNC borrowInterface (const IntfID &intfID, void **obj) const =0
 Returns another interface which is supported by the object without incrementing the reference count. More...
 
virtual ErrCode INTERFACE_FUNC dispose ()=0
 Disposes all references held by the object. More...
 
virtual ErrCode INTERFACE_FUNC getHashCode (SizeT *hashCode)=0
 Returns hash code of the object. More...
 
virtual ErrCode INTERFACE_FUNC equals (IBaseObject *other, Bool *equal) const =0
 Compares object to another object for equality. More...
 
virtual ErrCode INTERFACE_FUNC toString (CharPtr *str)=0
 Returns a string representation of the object. More...
 
- Public Member Functions inherited from IUnknown
virtual ErrCode INTERFACE_FUNC queryInterface (const IntfID &intfID, void **obj)=0
 Returns another interface which is supported by the object and increments the reference count. More...
 
virtual int INTERFACE_FUNC addRef ()=0
 Increments the reference count for an interface on an object. More...
 
virtual int INTERFACE_FUNC releaseRef ()=0
 Decrements the reference count for an interface on an object. More...
 

Member Function Documentation

◆ build()

virtual ErrCode INTERFACE_FUNC build ( IStruct **  struct_)
pure virtual

Builds and returns a Struct object using the currently set values of the Builder.

Parameters
[out]struct_The built Struct.

◆ get()

virtual ErrCode INTERFACE_FUNC get ( IString name,
IBaseObject **  field 
)
pure virtual

Gets the value of a field with the given name.

Parameters
nameThe name of the queried field.
[out]fieldThe value of the field.

◆ getAsDictionary()

virtual ErrCode INTERFACE_FUNC getAsDictionary ( IDict **  dictionary)
pure virtual

Gets the field names and values of the Struct as a Dictionary.

Parameters
[out]dictionaryThe Dictionary object with field names as keys, and field values as its values.

◆ getFieldNames()

virtual ErrCode INTERFACE_FUNC getFieldNames ( IList **  names)
pure virtual

Gets a list of all Struct field names.

Parameters
[out]namesThe list of field names.

The list of names will be of equal length to the list of values. Additionally, the name of a field at any given index corresponds to the value stored in the list of values.

◆ getFieldValues()

virtual ErrCode INTERFACE_FUNC getFieldValues ( IList **  values)
pure virtual

Gets a list of all Struct field values.

Parameters
[out]valuesThe list of field values.

The list of names will be of equal length to the list of values. Additionally, the name of a field at any given index corresponds to the value stored in the list of values.

◆ getStructType()

virtual ErrCode INTERFACE_FUNC getStructType ( IStructType **  type)
pure virtual

Gets the Struct's type.

Parameters
[out]typeThe Struct type

◆ hasField()

virtual ErrCode INTERFACE_FUNC hasField ( IString name,
Bool *  contains 
)
pure virtual

Checks whether a field with the given name exists in the Struct.

Parameters
nameThe name of the checked field.
[out]containsTrue if the a field with name exists in the Struct; false otherwise.

◆ set()

virtual ErrCode INTERFACE_FUNC set ( IString name,
IBaseObject field 
)
pure virtual

Sets the value of a field with the given name.

Parameters
nameThe name of the queried field.
fieldThe value of the field.

◆ setFieldValues()

virtual ErrCode INTERFACE_FUNC setFieldValues ( IList values)
pure virtual

Gets a list of all Struct field values.

Parameters
[out]valuesThe list of field values.

The list of names will be of equal length to the list of values. Additionally, the name of a field at any given index corresponds to the value stored in the list of values.