History

new ckdoc title rendering

Ge Wang committed 3 years ago

Commit 48fbb601 parent 52ee6729 files · +59 −22Browse files

Showing the changes to src/core/chuck_io.cpp (1 of 9 files). Show all

Unified · Split

src/core/chuck_io.cpp+5−4
@@ -93,7 +93,7 @@ t_CKBOOL init_class_io( Chuck_Env * env, Chuck_Type * type ) · 92 unmodified lines
9393 {
9494 // init as base class
9595 Chuck_DL_Func * func = NULL;
96− std::string doc = "";
96+ std::string doc = "Base class for other IO classes such as FileIO, StdOut and StdErr. Besides IO.newline(), it’s unlikely you need to use this class directly.";
9797
9898 // log
9999 EM_log( CK_LOG_SEVERE, "class 'IO'" );
@@ -272,7 +272,8 @@ t_CKBOOL init_class_fileio( Chuck_Env * env, Chuck_Type * type ) · 172 unmodified lines
272272 // init as base class
273273 // TODO: ctor/dtor?
274274 // TODO: replace dummy with pure function
275− if( !type_engine_import_class_begin( env, type, env->global(), fileio_ctor, fileio_dtor ) )
275+ if( !type_engine_import_class_begin( env, type, env->global(), fileio_ctor, fileio_dtor,
276+ "Helper class doing file-related operations such as reading, writing, seeking, etc. See examples for usage." ) )
276277 return FALSE;
277278
278279 // add open(string)
@@ -444,7 +445,7 @@ t_CKBOOL init_class_chout( Chuck_Env * env, Chuck_Type * type ) · 165 unmodified lines
444445 EM_log( CK_LOG_SEVERE, "class 'chout'" );
445446
446447 // TODO: ctor/dtor?
447− if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL ) )
448+ if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, "Do not instantiate this class directly! Use `chout` instead." ) )
448449 return FALSE;
449450
450451 // add good()
@@ -537,7 +538,7 @@ t_CKBOOL init_class_cherr( Chuck_Env * env, Chuck_Type * type ) · 86 unmodified lines
537538 EM_log( CK_LOG_SEVERE, "class 'cherr'" );
538539
539540 // TODO: ctor/dtor?
540− if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL ) )
541+ if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, "Do not instantiate this class directly! Use `cherr` instead." ) )
541542 return FALSE;
542543
543544 // add good()

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t