TVariable Assignment Operators

Assigns a new value to the TVariable. The SetDate and SetUTCTime with a void parameter list will be set to the current date and time.

TVariable& operator=(
   bool newValue
);
TVariable& operator=(
   char newValue
);
TVariable& operator=(
   short newValue
);
TVariable& operator=(
   int newValue
);
TVariable& operator=(
   __int64 newValue
);
TVariable& operator=(
   unsigned char newValue
);
TVariable& operator=(
   unsigned short newValue
);
TVariable& operator=(
   unsigned int newValue
);
TVariable& operator=(
   unsigned __int64 newValue
);
TVariable& operator=(
   float newValue
);
TVariable& operator=(
   double newValue
);
TVariable& operator=(
   FILETIME newValue
);
TVariable& operator=(
   const char* newValue
);
TVariable& operator=(
   const BYTE* newValue
);
TVariable& operator=(
   const char16_t* newValue
);
TVariable& operator=(
   TVariable *newReference
);
TVariable& operator=(
   const TVariable &newValue
);
TVariable& InitBinary(
   unsigned int value_l
);
TVariable& SetBinary(
   const void *newValue,
   unsigned int value_l = 0
);
TVariable& SetOSHandle(//Since TScript 1.3
/*For Windows*/
   HANDLE *newValue
/*For Linux*/
   int newValue
);
TVariable& SetStructure(
   const BYTE *newValue,
   unsigned int format = 0,
   TVariable &extras = TVariable(),
   count BYTE **returnLocation = NULL
);
TVariable& SetStructure(
   const char16_t *newValue,
   unsigned int format = 0,
   TVariable &extras = TVariable(),
   const char16_t **returnLocation = NULL
);
TVariable& SetDate();
TVariable& SetDate(
   unsigned int newValue
);
TVariable& SetUTCTime();
TVariable& SetUTCTime(
   FILETIME newValue
);

Parameters

newValueTVariable will set the type by the inputted parameter type.
newReferencePointer to a TVariable.
value_lBinary length. If this parameter is set to zero, then expects the newValue to be a null terminating string.
formatPlease see TVariable enum for correct values.
extrasReturns any left over information, such as the XML root node label.
returnLocationEnables caller to see if all the buffer contained a properly formated structure.

Return Values

These methods will return the new initialized TVariable.

Remarks

Example Use
  • C++
#include "TScript.h"

int wmain(int argc, wchar_t* argv[])
{
   TVariable var;
   var[0][u"fieldName"] = u"This is a string";
   MessageBox((wchar_t*)var.WString(),NULL,0);
   return NO_ERROR;
}

Also See

Copy, Substring
Listen All
Comments (0)
Characters left: 2500
 
Ekky Software Homepage T-Accounts Online ObjectDatabase++ TScript Ekky Software Homepage T-Accounts Onlinee ObjectDatabase++ TScript