mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 10:11:03 +00:00
([CStream -encodeWithName:valuesOfCTypes:...]): New method.
([CStream -decodeWithName:valuesOfCTypes:...]): New method. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@805 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
25df3a8cbd
commit
b05b881fa8
1 changed files with 34 additions and 0 deletions
|
@ -172,6 +172,40 @@ id CStreamSignatureMismatchException = @"CStreamSignatureMismatchException";
|
|||
|
||||
/* Encoding/decoding indentation */
|
||||
|
||||
- (void) encodeWithName: (id <String>) name
|
||||
valuesOfCTypes: (const char *) types, ...
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
[self encodeName: name];
|
||||
va_start (ap, types);
|
||||
while (*types)
|
||||
{
|
||||
[self encodeValueOfCType: types
|
||||
at: va_arg(ap, void*)
|
||||
withName: NULL];
|
||||
types = objc_skip_typespec (types);
|
||||
}
|
||||
va_end (ap);
|
||||
}
|
||||
|
||||
- (void) decodeWithName: (id <String> *)name
|
||||
valuesOfCTypes: (const char *)types, ...
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
[self decodeName: name];
|
||||
va_start (ap, types);
|
||||
while (*types)
|
||||
{
|
||||
[self decodeValueOfCType: types
|
||||
at: va_arg (ap, void*)
|
||||
withName: NULL];
|
||||
types = objc_skip_typespec (types);
|
||||
}
|
||||
va_end (ap);
|
||||
}
|
||||
|
||||
- (void) encodeIndent
|
||||
{
|
||||
/* Do nothing */
|
||||
|
|
Loading…
Reference in a new issue