-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PROCALL-3029 Repated is now differing between SetOf and SequenceOf. A…
… choice may contain repeated values such as SequenceOf and SetOf. Added some test cases for it
- Loading branch information
1 parent
9e94210
commit e5096b2
Showing
8 changed files
with
194 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { IAny, Any } from "./Any"; | ||
import { ILocalIdentificationBlockParams, LocalIdentificationBlock } from "./internals/LocalIdentificationBlock"; | ||
import { ETagClass, EUniversalTagNumber } from "./TypeStore"; | ||
|
||
export interface ISequenceOf extends IAny { | ||
value: Any; | ||
local: boolean; | ||
} | ||
|
||
export interface SequenceOfParams extends ILocalIdentificationBlockParams, Partial<ISequenceOf> { | ||
} | ||
|
||
export class SequenceOf extends Any { | ||
|
||
public value: Any; | ||
public local: boolean; | ||
public idBlock: LocalIdentificationBlock; | ||
|
||
constructor({ | ||
value = new Any(), | ||
local = false, | ||
...parameters | ||
}: SequenceOfParams = {}) { | ||
super(parameters); | ||
|
||
/** If the property is not explicitly defined as optional it may also be defined as optional with defining of the optionalID */ | ||
if(parameters.idBlock?.optionalID !== undefined && parameters.idBlock.optionalID >= 0) | ||
this.optional = true; | ||
|
||
if(!parameters.idBlock) | ||
parameters.idBlock = {}; | ||
parameters.idBlock.tagNumber = EUniversalTagNumber.Sequence; | ||
parameters.idBlock.tagClass = ETagClass.UNIVERSAL; | ||
|
||
this.idBlock = new LocalIdentificationBlock(parameters); | ||
|
||
this.value = value; | ||
this.local = local; /** Could local or global array to store elements */ | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters