FrameIT
REST_JSON_API.SOMDoc Class Referenceabstract
Inheritance diagram for REST_JSON_API.SOMDoc:
REST_JSON_API.SOMDocCRTP< T >

Classes

class  SOMDocToLambdaExpression
 Libary and configuartions to translate a SOMDoc AST into an Expression-Tree More...
 

Public Member Functions

SOMDoc SOMDocType ()
 
Type ToType ()
 
abstract bool Equivalent (SOMDoc sd2)
 
LambdaExpression GetLambdaExpression ()
 
LambdaExpression GetLambdaExpression (LambdaExpression[] lambda_applicant, LambdaExpression[] lambda_arguments, ParameterExpression[] bound_params)
 
abstract override string ToString ()
 
abstract SOMDoc MapURIs (Dictionary< string, string > old_to_new)
 
abstract string[] GetDependentFactIds ()
 
Func< object[], object[]> PartialInvokeCastingLambdaExpression (out Expression compile_base, out Type[] signature, object[] callArgs=null, bool[] useArgs=null)
 translates this SOMDoc AST into a C# AST, changes/casts the signature to Func<object[], object[]>, and compiles it. Function arguments can be inserted at any position as to partially invoke the function. More...
 

Static Public Member Functions

static SOMDoc SOMDocType (Type type)
 
static SOMDoc SOMDocObject (object obj, bool force=false)
 Attempts to build a @SOMDoc from any object. More...
 
static bool Equivalent (SOMDoc sd1, SOMDoc sd2)
 
static Vector3 MakeVector3 (OMA tuple)
 
static OMA MakeVector3 (Vector3 vec)
 
static OMA MakeTupel (SOMDoc[] args)
 
static OMA MakeShallowList (SOMDoc[] args)
 
static OMA MakeDeepList (SOMDoc[] args, SOMDoc SOMDoc_type)
 

Public Attributes

string kind
 

Protected Member Functions

 SOMDoc ()
 
abstract LambdaExpression _GetLambdaExpression (LambdaExpression[] lambda_applicant, LambdaExpression[] lambda_arguments, ParameterExpression[] bound_params)
 

Package Functions

abstract SOMDoc SOMDocType (SOMDoc[] args, FUN.Param[] bound_params)
 
abstract Type ToType (Type[] args,(string name, Type type)[] bound_params)
 

Constructor & Destructor Documentation

◆ SOMDoc()

REST_JSON_API.SOMDoc.SOMDoc ( )
protected

Member Function Documentation

◆ _GetLambdaExpression()

abstract LambdaExpression REST_JSON_API.SOMDoc._GetLambdaExpression ( LambdaExpression[]  lambda_applicant,
LambdaExpression[]  lambda_arguments,
ParameterExpression[]  bound_params 
)
protectedpure virtual

◆ Equivalent() [1/2]

static bool REST_JSON_API.SOMDoc.Equivalent ( SOMDoc  sd1,
SOMDoc  sd2 
)
static

◆ Equivalent() [2/2]

abstract bool REST_JSON_API.SOMDoc.Equivalent ( SOMDoc  sd2)
pure virtual

◆ GetDependentFactIds()

abstract string[] REST_JSON_API.SOMDoc.GetDependentFactIds ( )
pure virtual

◆ GetLambdaExpression() [1/2]

LambdaExpression REST_JSON_API.SOMDoc.GetLambdaExpression ( )

◆ GetLambdaExpression() [2/2]

LambdaExpression REST_JSON_API.SOMDoc.GetLambdaExpression ( LambdaExpression[]  lambda_applicant,
LambdaExpression[]  lambda_arguments,
ParameterExpression[]  bound_params 
)

◆ MakeDeepList()

static OMA REST_JSON_API.SOMDoc.MakeDeepList ( SOMDoc[]  args,
SOMDoc  SOMDoc_type 
)
static

◆ MakeShallowList()

static OMA REST_JSON_API.SOMDoc.MakeShallowList ( SOMDoc[]  args)
static

◆ MakeTupel()

static OMA REST_JSON_API.SOMDoc.MakeTupel ( SOMDoc[]  args)
static

◆ MakeVector3() [1/2]

static Vector3 REST_JSON_API.SOMDoc.MakeVector3 ( OMA  tuple)
static

◆ MakeVector3() [2/2]

static OMA REST_JSON_API.SOMDoc.MakeVector3 ( Vector3  vec)
static

◆ MapURIs()

abstract SOMDoc REST_JSON_API.SOMDoc.MapURIs ( Dictionary< string, string >  old_to_new)
pure virtual

◆ PartialInvokeCastingLambdaExpression()

Func< object[], object[]> REST_JSON_API.SOMDoc.PartialInvokeCastingLambdaExpression ( out Expression  compile_base,
out Type[]  signature,
object[]  callArgs = null,
bool[]  useArgs = null 
)

translates this SOMDoc AST into a C# AST, changes/casts the signature to Func<object[], object[]>, and compiles it. Function arguments can be inserted at any position as to partially invoke the function.

Parameters
compile_baseCached Expression Tree
signaturethe original signature
callArgsarguments to be inserted. The position carries over. Set null to skipp all.
useArgsset a position to false iff the corresponding entree in callArgs shall be ignored / the original parameter be used. Missing values will be interpreted as true. Set null to use all.
Returns
the compiled function, with a new signature and partially inserted arguments.

◆ SOMDocObject()

static SOMDoc REST_JSON_API.SOMDoc.SOMDocObject ( object  obj,
bool  force = false 
)
static

Attempts to build a @SOMDoc from any object.

Parameters
objobject to parse
forceuses case for Anonymous classes as failsafe
Returns
Exceptions
NotSupportedExceptioniff typeof(obj ) == Func
NotImplementedExceptioniff unknown type and force == false

◆ SOMDocType() [1/3]

SOMDoc REST_JSON_API.SOMDoc.SOMDocType ( )

◆ SOMDocType() [2/3]

abstract SOMDoc REST_JSON_API.SOMDoc.SOMDocType ( SOMDoc[]  args,
FUN.Param[]  bound_params 
)
packagepure virtual

◆ SOMDocType() [3/3]

static SOMDoc REST_JSON_API.SOMDoc.SOMDocType ( Type  type)
static

◆ ToString()

abstract override string REST_JSON_API.SOMDoc.ToString ( )
pure virtual

◆ ToType() [1/2]

Type REST_JSON_API.SOMDoc.ToType ( )

◆ ToType() [2/2]

abstract Type REST_JSON_API.SOMDoc.ToType ( Type[]  args,
(string name, Type type)[]  bound_params 
)
packagepure virtual

Member Data Documentation

◆ kind

string REST_JSON_API.SOMDoc.kind

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