12 #ifndef __CH_Collection_h__
13 #define __CH_Collection_h__
98 virtual int64 getMemoryUsage(
bool inclusive)
const;
105 virtual int canAccess(
uint mask)
const;
125 int getChannelNames(
CH_NameList &list,
int scope=0)
const;
126 int getChannelCount(
int scoped = 0)
const;
148 virtual int rename(
const char *from_name,
const char *to_name,
149 const char *to_alias);
151 const char *to_alias);
154 int deleteChannels();
160 bool no_disabling ,
int thread);
162 fpreal *vals,
int nsamples,
164 bool use_cache ,
int thread);
173 void unresolveLocalVars(
int thread);
181 bool use_alias=
false)
const;
183 bool use_alias=
false)
const
186 getFullPath(chp, s, use_alias);
196 void *
data =
nullptr)
const;
200 void findString(
const char *word,
bool fullword,
202 void *
data =
nullptr);
203 int findString(
const char *word,
bool fullword,
204 bool usewildcards)
const;
205 int changeString(
const char *from,
const char *to,
206 bool fullword,
int thread);
214 virtual int getUniqueId()
const;
226 virtual const void *getOwner()
const = 0;
227 virtual void *getOwner() = 0;
235 virtual bool getVariableValue(
UT_String &str,
238 virtual bool getVariableValue(
fpreal &
val,
247 int save(std::ostream &os,
bool binary,
bool compiled,
248 bool scoped,
bool pending_state,
250 int saveToFile(
const char *nm)
const;
252 template <
typename FPREAL_TYPE>
256 bool delete_keys =
false);
257 int loadFromFile(
const char *nm);
266 virtual void saveChannelForUndo(
CH_Channel *chp) = 0;
274 void setExpose(
bool onoff );
280 void clearAndDestroy();
285 { myVariables[0] =
table; }
288 {
return myManager->getGlobalStart(); }
290 {
return myManager->getGlobalEnd(); }
298 bool &timedep,
int thread);
301 { myVariables[3] =
table; }
307 void addedParamDependency();
308 void removeParamDependency();
319 {
return myExternal; }
321 { myExternal = yesno; }
330 static bool isValidChannelName(
const char *
s);
338 virtual void addLocalVarDependency(
int table,
int index,
354 int err = ev_GetErrNo(thread);
356 evaluationError(chp, err, thread);
360 { myVariables[2] =
table; }
367 virtual void notifyChannelRenameDependents(
const char *old_name,
368 const char *new_name);
376 myChannelAliasesTable;
382 char myParamDependent;
389 void evaluationError(
const CH_Channel *chp,
int err,
394 template <
typename FPREAL_TYPE>
CH_Manager * getManager() const
#define SETUPCLASSPACKETID(classname)
GT_API const UT_StringHolder time
void setExternal(bool yesno)
const GLuint GLenum const void * binary
GLsizei const GLchar *const * path
void updateGlobalVariables(CH_LocalVariable *table)
**But if you need a result
void addLocalVariables(CH_LocalVariable *table)
void addDynamicVariables(CH_LocalVariable *table)
GU_API GA_Offset getParent(const GU_Detail *gdp, const GA_Offset &node)
const CH_Channel * getChannel(int idx) const
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
fpreal getGlobalEnd() const
GU_API GA_OffsetArray getChildren(const GU_Detail *gdp, const GA_Offset &node, bool recurse=false)
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
void getFullPath(const CH_Channel *chp, UT_String &p, bool use_alias=false) const
CH_Channel * getChannel(int idx)
fpreal getTolerance() const
const CH_ChannelList * getChannels() const
GLuint const GLchar * name
CH_API void CHcollectionsToOPchannels(CH_CollectionList const &collections, UT_ValArray< OP_Channels * > &op_channels)
virtual OP_Channels * castToOPChannels()
GLenum GLenum GLsizei void * table
SYS_FORCE_INLINE void checkEvaluationError(const CH_Channel *chp, int thread) const
fpreal getGlobalStart() const
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
int(*)(CH_Collection *grp, CH_Channel *chp, void *) CHfindCallBack
UT_ArrayStringMap< CH_Channel * > CH_ChannelMap
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
virtual const OP_Channels * castToOPChannels() const
ImageBuf OIIO_API channels(const ImageBuf &src, int nchannels, cspan< int > channelorder, cspan< float > channelvalues={}, cspan< std::string > newchannelnames={}, bool shuffle_channel_names=false, int nthreads=0)
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.